use requestAnimationFrame for anim