tried fixing minmax