more clever path finding

But still not optimal