testing query code