add ecc support