minMax added