minor for loop cleaning