Figured out part of the reorder logic