changes tuples to lists in distances