updated templates to use jinja templating