Changing max to min, because that's what I originaly meant