refactor template header