HW2, completed step 6