adding email function (wow this is dirtyyy code)