adding templating code for email