update method example