building the template