templating working