refactoring for update methods