changed MatterDocument to MatterDocumentEntity