min is needed, not max