add comments and update email function