add SegIndexer source code