preparing for path finding

But I think floyd warshall is a bullshit for large data.