tpl refactor