revised production.rb