Improving QueryCallback