refinements to template