adds rspec tests to show how it can be done