replaced interval with raf