reverted back to C dac method