foreach step 3