added templating system