extract additional methods in Query class