Updated ex3.rb file