added requestAnimationFrame, experimented with new behavior