path finder algorithm