new changes for editdocument