mdc function readded