added documentation for querying