tpl refactoring