added ex3.rb