add segment method