protected function expandCharacterSets($spec)
    {
        $combined = '';
        if ($spec == self::EASY_TO_READ) {
            $spec |= self::CHAR_ALNUM;
        }
        foreach ($this->charArrays as $flag => $chars) {
            if ($flag == self::EASY_TO_READ) {
                // handle this later
                continue;
            }
            if (($spec & $flag) === $flag) {
                $combined .= $chars;
            }
        }
        if ($spec & self::EASY_TO_READ) {
            // remove ambiguous characters
            $combined = str_replace(str_split(self::AMBIGUOUS_CHARS), '', $combined);
        }

        return count_chars($combined, 3);
    }