add Query class