removed frameRate and locked refresh to window.requestAnimationFrame