update document now working