add update document method