seperate updateAnimation from render