Improve the ordering process in preprocessing phase.