basic function of variable resistor