diff --git a/Solver/filters.h b/Solver/filters.h
new file mode 100644
index 0000000000000000000000000000000000000000..935e4fa662dcb61edfce8067366b6d6ebfd3c12d
--- /dev/null
+++ b/Solver/filters.h
@@ -0,0 +1,68 @@
+//
+// Description : Filtered and xFem function space definition
+//
+//
+// Author:  <Eric Bechet>::<Boris Sedji>,  02/2010
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#ifndef _XFEMFS_H_
+#define _XFEMFS_H_
+
+#include "simpleFunction.h"
+#include "dofManager.h"
+
+class FilterNodeEnriched
+{
+
+  private :
+
+    std::set<int> *_TagEnrichedVertex;
+    std::set<int> * _EnrichComp;
+
+  public :
+
+    FilterNodeEnriched(std::set<int > * TagEnrichedVertex , std::set<int> * EnrichComp)
+    {
+      _TagEnrichedVertex = TagEnrichedVertex;
+      _EnrichComp = EnrichComp;
+    }
+
+    virtual bool operator () (Dof & key) const
+    {
+      std::set<int>::iterator it1;
+      std::set<int>::iterator it2;
+      int i1,i2;
+      Dof::getTwoIntsFromType(key.getType(), i1,i2);
+       it2 = _EnrichComp->find(i1);
+      it1 = _TagEnrichedVertex->find(key.getEntity());
+      if (it1!=_TagEnrichedVertex->end() & it2 != _EnrichComp->end())
+      {
+        return true;
+      }
+      else return false;
+    }
+
+    //std::vector<int> * getEnrichComp(){return _EnrichComp;}
+
+//    void SetEnrichedVertex(MElement *elep, std::vector<int> & EnrichedVertex,int &nbdofs)
+//    {
+//      EnrichedVertex.clear();
+//      nbdofs = 0;
+//      for (int i=0 ;i<elep->getNumVertices();i++)
+//      {
+//        std::set<int>::iterator it;
+//        it = _TagEnrichedVertex->find(elep->getVertex(i)->getNum());
+//        if (it!=_TagEnrichedVertex->end())
+//        {
+//            EnrichedVertex.push_back(i);
+//            nbdofs = nbdofs + 1*_EnrichComp->size(); // enriched dof
+//        }
+//      }
+//    }
+};
+
+
+#endif
diff --git a/Solver/functionSpace.h b/Solver/functionSpace.h
index e00614e583ecea33764a75c0d4392efba2235d01..13b7d83f0aa80f6cbd5f9237fd2c1b957c20680e 100644
--- a/Solver/functionSpace.h
+++ b/Solver/functionSpace.h
@@ -310,9 +310,9 @@ class CompositeFunctionSpace : public FunctionSpace<T>
   std::vector<FunctionSpace<T>* > _spaces;
  public:
   template <class T1> CompositeFunctionSpace(const T1& t) { _spaces.push_back(new T1(t));}
-  template <class T1, class T2> CompositeFunctionSpace(T1& t1, T2& t2)
-  { _spaces.push_back(&t1);
-    _spaces.push_back(&t2); }
+  template <class T1, class T2> CompositeFunctionSpace(const T1& t1,const T2& t2)
+  { _spaces.push_back(new T1(t1));
+    _spaces.push_back(new T2(t2)); }
   template <class T1, class T2, class T3> CompositeFunctionSpace(const T1& t1, const T2& t2, const T3& t3)
   { _spaces.push_back(new T1(t1));
     _spaces.push_back(new T2(t2));