solution to ruby-0 challenge 2