move document creation methods to their own module