Updated ex12.rb