add private function removeQuery