minor rearranging of index