added adcread function