Adding D3 functionality