Corrected for loop