implemented email notifications