first pass of pathfinding - made graphs and pathfinder (djikstras algo)