added fetch function for documents
added functionality for adding documents to other entities