recoded all files and created an rspec test file