created a document model and controller