remove unnecessary segmant