pulling out email parser into its own method