Update the code for EC