Wrote path finding.