added email function, testing