pseudo code for Dijkstra algorithm (shortest path)