move function for county-provinces updating to global scope so it can be reused