inplace reorder