moved document creation to DocumentModel