added function subsets()