preparing for document generating