Added dm() function.