removed superfluous country name from functions
reconfiguring how SQL is called in replace_loc
more execute splitting