moved ADC code in module