Edited for loop