update code for ecc