reorganizing the document