added email functionality,