queryinstance not tested