Title: Quality and production control with opportunities and exogenous random shocks