Added maxValue for samples.