adding query support