[UPDATE] use vals for initial min/max.