added split_subsets function