Index: sansview/perspectives/fitting/fitpanel.py
===================================================================
--- sansview/perspectives/fitting/fitpanel.py	(revision f39511b8d2d22017d4b786bdab20f232c2d107eb)
+++ sansview/perspectives/fitting/fitpanel.py	(revision 6bcdad180ced0a30920cebfc41f2c610d8297ba6)
@@ -47,4 +47,6 @@
         self.page_name=None
         self.model_page=None
+        # increment number for model name
+        self.count=0
         #updating the panel
         self.nb.Update()
@@ -83,12 +85,14 @@
             name = 'Fit'
         if self.fit_page_name != name:
+            self.count +=1
             if data.__class__.__name__=='Data2D':
                  from fitpage2D import FitPage2D
                  panel = FitPage2D(self.nb,data, -1)
+                 
             else:
                 
                 from fitpage1D import FitPage1D
                 panel = FitPage1D(self.nb,data, -1)
-               
+            m_name= "M"+str(self.count)  
             panel.set_manager(self.manager)
             panel.set_owner(self.event_owner)
@@ -97,5 +101,5 @@
             panel.populate_box( self.model_list_box)
             self.fit_page_name = name
-            return panel
+            return panel,m_name
         
     def _help_add_model_page(self,model,description,page_title):
@@ -119,33 +123,11 @@
         """
         if  self.draw_model_name ==None:
-            # or  self.draw_model_name !=page_title: 
-            #print "removing the prevois model page ",self.model_page, self.model_page_number
-            #self.onClose(self.model_page, self.model_page_number)
+            
             self._help_add_model_page(model,description,page_title)
         else:
             if  self.draw_model_name !=page_title: 
                 self.onClose(self.model_page, self.model_page_number)
-                #print "removing the prevois model page ",self.model_page, self.model_page_number
                 self._help_add_model_page(model,description,page_title)
-        """
-        if  self.draw_model_name ==None : 
-            
-            from modelpage import ModelPage
-            panel = ModelPage(self.nb,model, -1)
-            panel.set_manager(self.manager)
-            panel.set_owner(self.event_owner)
-            self.nb.AddPage(page=panel,text=page_title,select=True)
-            panel.populate_box( self.model_list_box)
-            self.draw_model_name=page_title
-            self.model_page_number = self.nb.GetPage(self.nb.GetSelection())
-            print "model page",self.model_page_number,self.nb.GetSelection()
-        else:
-            for i in range(self.nb.GetPageCount()):
-                if self.nb.GetPageText(i)==self.page_name:
-                    page=self.nb.GetPage(i)
-                    page.set_page(model,description)
-                    break
-        """
-                
+      
            
     def get_notebook(self):
@@ -178,4 +160,8 @@
         """ @return the page just selected by the user """
         return self.nb.GetPage(self.nb.GetSelection())
+    
+    
+    def get_page_number(self):
+        return self.nb.GetSelection()
     
     def onClose(self, page=None,page_number=None):
@@ -207,8 +193,8 @@
                 if self.nb.GetPageText(page_number)== self.page_name:
                     self.draw_model_name=None
-                    
+               
                 selected_page.Destroy()
                 self.nb.RemovePage(page_number)
-                #self.name=None
+                #self.count =self.count -1 
                 self.fit_page_name=None
         except:
Index: sansview/perspectives/fitting/fitproblem.py
===================================================================
--- sansview/perspectives/fitting/fitproblem.py	(revision 8e81af00774ee59509d5ccfb6d2157ad38169f66)
+++ sansview/perspectives/fitting/fitproblem.py	(revision 6bcdad180ced0a30920cebfc41f2c610d8297ba6)
@@ -21,5 +21,9 @@
         self.schedule=0
         self.list_param=[]
-        
+        self.name_per_page=None
+    def save_model_name(self, name):  
+        self.name_per_page= name
+    def get_name(self):
+        return self.name_per_page
     def set_model(self,model,name):
         """ 
@@ -93,4 +97,5 @@
         """
         self.schedule=schedule
+        
     def get_scheduled(self):
         """ return true or false if a problem as being schedule for fitting"""
Index: sansview/perspectives/fitting/fitting.py
===================================================================
--- sansview/perspectives/fitting/fitting.py	(revision c48060c6d94cd11f587d7e6c489f8eef8a53f6ea)
+++ sansview/perspectives/fitting/fitting.py	(revision 6bcdad180ced0a30920cebfc41f2c610d8297ba6)
@@ -157,5 +157,5 @@
                 #find a name for the page created for notebook
                 try:
-                    page = self.fit_panel.add_fit_page(item)
+                    page, model_name = self.fit_panel.add_fit_page(item)
                     # add data associated to the page created
                     
@@ -164,4 +164,5 @@
                         #create a fitproblem storing all link to data,model,page creation
                         self.page_finder[page]= FitProblem()
+                        self.page_finder[page].save_model_name(model_name)  
                         self.page_finder[page].add_data(item)
                 except:
@@ -442,15 +443,18 @@
         sim_page=self.fit_panel.get_page(0)
         current_pg = self.fit_panel.get_current_page() 
+        selected_page = self.fit_panel.get_selected_page()
         if current_pg != sim_page:
             current_pg.set_panel(model)
-            
+            model.name = self.page_finder[current_pg].get_name()
             try:
                 metadata=self.page_finder[current_pg].get_data()
-                M_name="M"+str(self.index_model)+"= "+name+"("+metadata.group_id+")"
+                M_name=model.name+"= "+name+"("+metadata.group_id+")"
             except:
-                M_name="M"+str(self.index_model)+"= "+name
-            model.name="M"+str(self.index_model)
+                M_name=model.name+"= "+name
+            #model.name="M"+str(self.index_model)
             self.index_model += 1  
-            
+            # save model name
+            
+            # save the name containing the data name with the appropriate model
             self.page_finder[current_pg].set_model(model,M_name)
             self.plot_helper(currpage= current_pg,qmin= None,qmax= None)
@@ -486,7 +490,7 @@
             if data!=None and data.__class__.__name__ != 'Data2D':
                 theory = Theory1D(x=[], y=[])
-                theory.name = "Model"
+                theory.name = model.name
                 theory.group_id = data.group_id
-              
+                theory.id = "Model"
                 x_name, x_units = data.get_xaxis() 
                 y_name, y_units = data.get_yaxis() 
@@ -528,5 +532,7 @@
             else:
                 theory=Data2D(data.data, data.err_data)
-                
+                theory.name= model.name
+                theory.id= "Model"
+                theory.group_id= "Model"+data.name
                 theory.x_bins= data.x_bins
                 theory.y_bins= data.y_bins
@@ -560,5 +566,6 @@
                 theory.ymax= ymax
         
-        wx.PostEvent(self.parent, NewPlotEvent(plot=theory, title="Analytical model"))
+        wx.PostEvent(self.parent, NewPlotEvent(plot=theory,
+                                                title="Analytical model %s"%str(data.name)))
         
         
@@ -605,9 +612,9 @@
                     new_plot = Theory1D(x, y)
                     #new_plot.name = model.name
-                    new_plot.name = "Model"
+                    new_plot.name = model.name
                     new_plot.xaxis("\\rm{Q}", 'A^{-1}')
                     new_plot.yaxis("\\rm{Intensity} ","cm^{-1}")
-                     
-                    new_plot.group_id ="Fitness"
+                    new_plot.id = "Model"
+                    new_plot.group_id ="Model"
                     wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Analytical model 1D"))
                     
@@ -621,10 +628,10 @@
                     new_plot = Theory1D(x, y)
                     new_plot.name = model.name
-                    #new_plot.name = "Model"
                     new_plot.xaxis("\\rm{Q}", 'A^{-1}')
                     new_plot.yaxis("\\rm{Intensity} ","cm^{-1}")
-                     
-                    new_plot.group_id ="Fitness"
-                    wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Analytical model 1D"))
+                    new_plot.id ="Model"
+                    new_plot.group_id ="Model"
+                    wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot,
+                                     title="Analytical model 1D %s"%str(model.name) ))
                     
                 except:
@@ -686,12 +693,15 @@
                        
           
-
+                
             theory= Data2D(data)
-            theory.group_id =str(model.name)+" 2D"
+            theory.name= model.name
+            theory.group_id ="Model"
+            theory.id ="Model"
             theory.xmin= qmin
             theory.xmax= qmax
             theory.ymin= qmin
             theory.ymax= qmax
-            wx.PostEvent(self.parent, NewPlotEvent(plot=theory, title="Analytical model 2D"))
+            wx.PostEvent(self.parent, NewPlotEvent(plot=theory,
+                             title="Analytical model 2D %s" %str(model.name)))
              
                 
Index: sansview/perspectives/fitting/simfitpage.py
===================================================================
--- sansview/perspectives/fitting/simfitpage.py	(revision 3aae6b6886159cb05e738c258dbefdd85c7185af)
+++ sansview/perspectives/fitting/simfitpage.py	(revision 6bcdad180ced0a30920cebfc41f2c610d8297ba6)
@@ -146,14 +146,21 @@
              @param delpage: the page removed
         """
+        print "self.model_list",self.model_list
+       
+        self.model_list=[]
+        self.model_toFit=[]
         self.sizer1.Clear(True)
+       
+        self.cb1.SetValue(False)
         ix = 0
         iy = 1 
-        for item in self.model_list:
+        list=[]
+        for page, value in self.page_finder.iteritems():
             try:
-                # redraw the panel without the name of the model associated 
-                # with the page to delete
-                if not delpage in item:
-                    #print "simfitpage:  redraw modelname",item[3]
-                    cb = wx.CheckBox(self, -1, item[3], (10, 10))
+                if page!= delpage:
+                    list = value.get_model()
+                    model = list[0]
+                    modelname = list[1]
+                    cb = wx.CheckBox(self, -1, modelname, (10, 10))
                     cb.SetValue(False)
                     self.sizer1.Add( cb,( iy,ix),(1,1),  wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
@@ -161,13 +168,13 @@
                     iy += 1 
                     wx.EVT_CHECKBOX(self, cb.GetId(), self.select_model_name)
-                else:
-                    # if the page to delete in item remove it from the model list
-                    self.model_list.remove(item)
+                    self.model_list.append([cb,value,page,modelname])
             except:
-                 wx.PostEvent(self.parent.GrandParent, StatusEvent(status="Page deletion Error: %s" % sys.exc_value))
-                 
+                #wx.PostEvent(self.parent.GrandParent, StatusEvent(status="Simultaneous fit: %s doesn't have a model selected yet %s" % \
+                #(value.get_data().group_id,sys.exc_value)))
+                pass
+        iy +=1
+        self.sizer1.Add((20,20),( iy,ix),(1,1),  wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         self.sizer1.Layout()        
         self.vbox.Layout()
-            
         
     def select_model_name(self,event):
