rename events and segments to items in viewState