added validations
Merge pull request #7 from th7/rspec

added validations