Some code for D3js