changed d3.json to ajax and things are working