added basic validations, rspec tests