add code to pass rspec test, and additional test code