add email function and fix typos