distance for list of points