implement cnd writer