small changes
added rspec tests