centerCity function