get d3 index working