modified

modified for loop