adding the template id