modify update method