Finished Ex40.rb