code through step 6