doing the templating thing