Added Query class