add query pair