add path memory to floyd warshall