added ex12.rb