separate KeyComparator from Key.