first solution to ruby-0-ex2