Added DAC logic