solved but with a problem of segmentation