Updated to production code