Now calculate distance matrix uses HashMap instead of TreeMap Needed to change the hashCode function in Contact to make it faster