added the quickCitySort function