changed _rAF to requestAnimationFrame