Refactoring update method