added email button and function