how to update object