code cleanup step 3