Update dm.cpp