shortest path calculator using d3