function of variable resistor potentiometer