iteration version of all subsets