some JavaScript to use D3