optmization of segmenter task