Changed name of function
changed location of the window.requestAnimationFrame