added ex8.rb