added a query script