Rewritten mpdm_slice().