problem 3 ruby