several changes, including defintion of distances, indices, datasets