Theory and application of anion selective membrane electrodes