test for shortest paths worked