Completed ruby exercise 6