library for querying