solved problem 29 again in ruby