better sorter

made it cover if equals and all combos i could find just put it in one
place for simplicity.