problem 5 in ruby, README