Tc3

replacement for R-implementation of the error correction