removed bitset, use unordered_set to store states
Removed bitset; temporarily using std::unordered_set