reorganized fetch_emails