corrected trigger and implimented DAC