got basic query support working