refine model template