optimized code for adding new cities