update the animation