finding the seg