modified template.sh