adding full-stack persistence of distances