optimize ListOrder. avoid stack overflow