added functionality and email