added example 3, ex3.rb