add test for distance_matrix