everything is finished, begin to prepare the document