change distance graph precomputed, twice faster