Update the code function