Custom logic pathfinder.