updated requestAnimationFrame for high res timing