implemented validate method
Merge pull request #10 from arnellebalane/validate

implemented validate method