First distance function tries