step 5: update and remove