Updated the DM operations code