Uses min value instead of hard coded value