finish the ex40.rb