my ($maxkey, $maxmax) = kv_for_largest_v($distances{$key1};