updated update method