added adc code