added code for template