reworked the templates