Improve 3.rb