added example 2 ex2.rb