updated documentation of the query script