reorder logic implemented.