switched rendering to requestAnimationFrame, lot smoother