Customized to ECC

Just a bit neater for ecc to use