fix example
create DocumentFactory