update segment method