added email parsing and saving to db