distanceMatrix calculation added