finishing random circles with "d3.js" and base js optimization