added ex9.rb