added templating utility