cleaned up tpl code