def to_h
      output = {}
      instance_variables.each do |var|
        output.merge!({ var[1..-1] => instance_variable_get(var) }) unless var == '@xml'    # exclude the whole XML dump
      end
      output
    end
def to_h
      output = {}
      instance_variables.each do |var|
        output.merge!({ var[1..-1] => instance_variable_get(var) }) unless var == '@xml'    # exclude the whole XML dump
      end
      output
    end
output as hash