rewrite example tcl scripts