ruby exercise 1-3