add CALCULATE_SEGMENTS