Adding dijkstra algorithm to find the shortestPath. useful references from the net.