warning, the p powerset function is extremely slow at the moment