updated working changes to pathfinding