Added update document method.