Mgd1's routine