adding email tests and fixing syntax errors