eliminate duplicate computation of regParam