updates the code