+sub _add
+{
+ my ($db, $call, $city, $state) = @_;
+
+ # lookup the city
+ my $s = uc "$city|$state";
+ my $ctyn = $db->{$s};
+ unless ($ctyn) {
+ my $no = $db->{'##'} || 1;
+ $ctyn = "#$no";
+ $db->{$s} = $ctyn;
+ $db->{$ctyn} = $s;
+ $no++;
+ $db->{'##'} = "$no";
+ }
+ $db->{uc $call} = $ctyn;
+}
+
+sub add
+{
+ _add(\%db, @_);
+}
+