fix update method to return the object