Changes for adc, copy&paste from revomini