Update geometric_distance.R