Hex sorting