Added an INDEX for loop