break this out into a new function

fixed inline for loop overwriting curCity