handle line segmentation still buggy