added example 5, ex5.rb