extended the index range for inversions