templating almost working