update method