what is the working principle of potentiometer