using webkitRequestAnimationFrame instead of setInterval added