update to script and to templates