move tpl scripts to util