discrarding the samples where Z is rank deficient