added rAF support and shim