use requestAnimationFrame & update demo