$hash{$root} = $ext if (not defined $hash{$root}) or $ext > $hash{$root};