solution for Subsets