working on C++ powerset