modified pathfinding algo. modified which edges are drawn to the screen