removed Dijkstra, added enum Direction.