-my $hashref = { data_vendor => $data_vendor,
- #city => $city,
- #state => $state,
- zip => $zip5,
- };
-#my @keys = qw ( city state zip );
-my @keys = qw ( zip );
+my($geocode) = $cgi->param('geocode') =~ /^([\w]+)$/;
+
+my($zip5, $zip4) = split('-', $location{zip});
+
+#only support US & CA
+my $hashref = { 'data_vendor' => $location{data_vendor} };
+$hashref->{zip} = $location{country} eq 'CA' ? substr($zip5,0,1) : $zip5,
+
+my @keys = keys(%$hashref);