added ex18.rb