adds update method