Change for loop to foreach

Done in latest commit