what is template and how to create a template