Midpoint-segment: The power of abstractions