deleted extra average_distance from invariants