Common method for querying facts