changed templating system