implemented adc.c