adding query script