made another minor change
modified and added codes for new template