simple data is one-sided
taking upper triangular part of distance matrix