Added filtering and segmentation