Implemented HW5a without rspec tests