update document and some other classes