Completed ECC and added encryptrange