add dijkstras algo for pathfinding