optimization to path finding.