feature segmenter refactor