add bitmask solution