changed checkPattern to detect email and phone patterns

Completed the email functions