update d.c and c.d