added algorithm to generate all subsets of a given set.