added extra credit to ex14.rb