added path finder code