added page segmentation mode