index cities example composite pattern