implement closest + furthest body calculation, average distance