adding query