new code for SMART_bias_control