testing new validate function
moved validating to functions
Merge pull request #4 from davidssmith/validate

Validate moved to functions