added d3 code