changed templating script