added removeQuery to query sample