edited loop section to have sections for ADC and DAC