Default comparator was the best I could come up with, any better solutions?