added general query support