Assignment 05, shortest distance using dijkstra's algorithm