adjust the document