modifing order.rb with reduce