mr distance matrix