refactor template creation