move four functions from utils to city_codes