building the email templates inappropriately