how to template