updated error correction