Added dynamic templating