simplify b-tag scale-factor code