update templating and functionality