adds distance matrix capability