added code to template