modified sample query