Refined for loop