def update_chr(options = {} )
    @opt = {
      :name => ''
    }.merge!(options)
    return false if !@opt[:index]

    @index = @opt[:index].to_i
    
    # need to create the characters
    
    raise(NexusParser::ParseError, "Can't update character of index #{@index}, it doesn't exist! This is a problem parsing the character state labels. Check the indices. It may be for this character \"#{@opt[:name]}\".") if !@nf.characters[@index]

    (@nf.characters[@index].name = @opt[:name]) if @opt[:name]
  
    @opt.delete(:index)
    @opt.delete(:name)
   
    # the rest have states
    @opt.keys.each do |k|
      
      if (@nf.characters[@index].states != {}) && @nf.characters[@index].states[k] # state exists
        
        ## !! ONLY HANDLES NAME, UPDATE TO HANDLE notes etc. when we get them ##
        update_state(@index, :index => k, :name => @opt[k])
        
      else # doesn't, create it
        @nf.characters[@index].add_state(:label => k.to_s, :name => @opt[k])
      end
    end
    
  end
def update_chr(options = {} )
    @opt = {
      :name => ''
    }.merge!(options)
    return false if !@opt[:index]

    @index = @opt[:index].to_i
    
    # need to create the characters
    
    raise(NexusParser::ParseError, "Can't update character of index #{@index}, it doesn't exist! This is a problem parsing the character state labels. Check the indices. It may be for this character \"#{@opt[:name]}\".") if !@nf.characters[@index]

    (@nf.characters[@index].name = @opt[:name]) if @opt[:name]
  
    @opt.delete(:index)
    @opt.delete(:name)
   
    # the rest have states
    @opt.keys.each do |k|
      
      if (@nf.characters[@index].states != {}) && @nf.characters[@index].states[k] # state exists
        
        ## !! ONLY HANDLES NAME, UPDATE TO HANDLE notes etc. when we get them ##
        update_state(@index, :index => k, :name => @opt[k])
        
      else # doesn't, create it
        @nf.characters[@index].add_state(:label => k.to_s, :name => @opt[k])
      end
    end
    
  end
legal hash keys are :index, :name, and integers that point to state labels