change-for-to-foreach