New type of tree and new distance calculations