refactoring +segment into +define & +segment
refactoring segmentation --> tfd works with template