added window.requestAnimationFrame