public function hashString($text)
    {
        $charList = str_split($text);
        $chars = array_fill_keys( $charList, 0);
        foreach($charList as $char) { 
            $chars[$char]++;
        }
        return $chars;
    }