optimized pathfinder