finished hamming exercise with rspec, 2 different methods