refactor sort_by_highest_pairability [#74522490]