added helper methods for url and email validation