added new methods for querying relationships between docs