update the document and the code