finish kv query