page segmentation scripts