sort package:utility-ht

This is convenient for quick hacks but I suggest that you better define a type for an ordered pair for your application at hand. This way, you can clearly see from the type that a pair is ordered.