Reorder now function returns outIndices