solution ruby-0-ex7