changed the animation to RequestionAnimationFrame, TIL