changed bitmask to std::bitset