added unit testing for gen.tcl