updating correlated errors code