added snippet to validate email addresses; simple and needs some work
but functional for basic cases