moved QueryImpl to public package