fix undefined raf. Add example