TCL: review scope of functions