New query protocol