added check for disjoint folds