templating now working