Collapsing also returns distances