email now works in heroku, needs refactoring