adding new code for d3