cmp to key