save the function of powerset that i found in the internet. Might be useful.