update method works