problem 4 ruby
not happy with how i did this