diff --git a/appl/lecture/msm/1p2cvs2p/lensproblem1p2c.hh b/appl/lecture/msm/1p2cvs2p/lensproblem1p2c.hh
index 4c8e0aab93bc203a9865bec397cd59936a47efd6..8280d9064ac162396e7cb818f8c1ebf425d9d8b7 100644
--- a/appl/lecture/msm/1p2cvs2p/lensproblem1p2c.hh
+++ b/appl/lecture/msm/1p2cvs2p/lensproblem1p2c.hh
@@ -153,6 +153,7 @@ class LensProblem : public OnePTwoCBoxProblem<TypeTag>
     typedef Dune::FieldVector<Scalar, dim> LocalPosition;
     typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
     typedef typename GET_PROP(TypeTag, PTAG(ParameterTree)) Params;
+    typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector;
 
 public:
     LensProblem(TimeManager &timeManager,
@@ -173,6 +174,24 @@ public:
         infiltrationRate_ = Params::tree().template get<double>("Boundary.InfiltrationRate");
         infiltrationStartTime_= 1.0e-9;//The infiltrations starts always after the first time step!
         infiltrationEndTime_= Params::tree().template get<double>("Boundary.InfiltrationEndTime");
+
+
+        resX_ = 40;
+        resY_ = 64;
+
+        // Write header for output file
+        std::ofstream dataFile;
+		dataFile.open("dumux-out.vgfc");
+//		dataFile << "Gridplot" << std::endl;
+		dataFile << "## This is a DuMuX output for the ViPLab graphics driver. \n";
+		dataFile << "## This output file was generated at " << __TIME__ <<", "<< __DATE__<< "\n";
+		dataFile << "# x-range " << this->bboxMin()[0] << " " << this->bboxMax()[0] << "\n" ;
+		dataFile << "# y-range " << this->bboxMin()[1] << " " << this->bboxMax()[1] << "\n" ;
+		dataFile << "# x-count " << resX_+1 << "\n" ;
+		dataFile << "# y-count " << resY_+1 << "\n" ;
+//		dataFile << "# min-color 0 0 0\n";
+//		dataFile << "# max-color 255 255 255\n";
+		dataFile.close();
     }
 
     /*!
@@ -318,6 +337,41 @@ public:
     }
     // \}
 
+//
+    void writeOutput()
+    {
+    	//todo: Das hier ist noch nicht fertig.
+
+    	Scalar time = this->timeManager().time();
+    	if (time<0)
+    		return;
+    	SolutionVector &sol = this->model().curSol();
+
+        std::ofstream dataFile;
+		dataFile.open("dumux-out.vgfc", std::fstream::app);
+
+		dataFile << "# time "<< time <<"\n" ;
+		dataFile << "# label Concentration \n";
+		dataFile << "# min-color 0 0 0\n";
+		dataFile << "# max-color 255 255 255\n";
+
+		for (int j=0; j < resY_+1; j++)
+		{
+			for (int i=0; i < resX_+1; i++)
+			{
+				int currentIdx = i*(resY_+1)+j;
+				dataFile << sol[currentIdx][x1Idx];
+				if(i != resX_) // all but last entry
+					dataFile << " ";
+				else // write the last entry
+				{
+					dataFile << "\n";
+				}
+			}
+		}
+		dataFile.close();
+    }
+
 
 private:
     bool onLeftBoundary_(const GlobalPosition &globalPos) const
@@ -358,6 +412,9 @@ private:
     Scalar infiltrationRate_;
     Scalar infiltrationStartTime_;
     Scalar infiltrationEndTime_;
+    int resX_;
+    int resY_;
+
 };
 } //end namespace