completed to ex25.rb