segmentation source code added