put indexes into an array to simplify processing