handling output of csv for D3