refactor template codes
refactor
refactor