changed call to requestAnimationFrame to support future versions of API