finish the adjust_voltage function