added rspec tests, and passed them