finished djikstra