new file dm.c added