update gen sort <=> to cmp