new document creation routine