batch rearrangement