added example of general function for making a distance matrix