completed to ex19.rb