Implementing the RMD command