d3 implementation