adding document segmentation