initial implementation of the document class