Rewriting orderlist