void merge(final double low, final double high)
    {
        if(list.isEmpty()) {
            list.add(new Interval(low, high));
        } else {
            final double eps = 0.01;

            // try to merge first
            boolean newShadow = true;
            for(Interval interval : list) {
                if((low <= interval.low && high >= interval.low-eps) ||
                   (low <= interval.high+eps && high >= interval.high)) {

                    if(low < interval.low) {
                        interval.low = low;
                    }

                    if(high > interval.high) {
                        interval.high = high;
                    }

                    newShadow = false;
                }
            }

            if(newShadow) {
                list.add(new Interval(low, high));
            }
        }
    }