Written untested functions for ADC