updated code
added d3 code