added requestAnimationFrame wrapper