added client side templating