Mad Lab tcl library procedures