added some templating