edited production.r