refactor template path