finish basic query