for loop to foreach loop