somewhat working adc->dac code!