add segment managing