changed update method