def extend_initials!
      groups = Hash.new do |h,k|
        h[k] = { :prototype => nil, :names => [] }
      end

      # group names together
      names.each do |name|
        group = groups[name.sort_order(:initials => true).downcase]
        group[:names] << name

        if group[:prototype].nil? || group[:prototype].first.to_s.length < name.first.to_s.length
          group[:prototype] = name
        end
      end

      # extend all names in group to prototype
      groups.each_value do |group|
        group[:names].each do |name|
          name.set(group[:prototype])
        end
      end

      self
    end
def extend_initials!
      groups = Hash.new do |h,k|
        h[k] = { :prototype => nil, :names => [] }
      end

      # group names together
      names.each do |name|
        group = groups[name.sort_order(:initials => true).downcase]
        group[:names] << name

        if group[:prototype].nil? || group[:prototype].first.to_s.length < name.first.to_s.length
          group[:prototype] = name
        end
      end

      # extend all names in group to prototype
      groups.each_value do |group|
        group[:names].each do |name|
          name.set(group[:prototype])
        end
      end

      self
    end
This method combines all names in the bibliography that look identical
 when using initials as first names and then tries to extend the first
 names for all names in each group to the longest available form.
 Returns the bibliography.

 If your bibliography contains the names 'Poe, Edgar A.', 'Poe, E.A.',
 and 'Poe, E. A.' calling this method would convert all three names to
 'Poe, Edgar A.'.