refactor around kv.cmp

unified definition of what it means to be the equal