Implemented updateObject method