Merge distance into distance