finish the d3.js script