rename _segments to mem