removed rendundant code and modified tempalter.sh