refactored update object