added example 7, ex7.rb