server side templating code