reverted getMinMax() change back