cumulative min and max added