sort by flip operation TBC