changed minVal init from 0 to -99979