added templating ability