Change variable name from max to min in minWith