exercise 1 in ruby