Changed the for loop iterator