half-working requestAnimationFrame