updated cumulative variability so that it now also give option of
subtracting the mean