more detailed williams_edge_distance