Improve segmentation and add the freezing of the graph
Change parameter file
Add skeleton of function to complete