HW2, completed step 4