updated code to include d3 svg