generalized mito_shuffle