proper min/max.