sum of intervals to examples