Add Query class