diff --git a/.gitignore b/.gitignore
index 23a71970bac08314e394b6fc9f8faffaec2e7202..2604a44e38cc8f81bbfa288b9fed9655cd2f5ad2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,7 @@
 /src/perf.data
 /src/xyz
 /tests/
+/bla
+/points
+/testdata
+/testdata2.csv
diff --git a/src/dwyer.c b/src/dwyer.c
index 1c5ec4fb6d7bab63f131e2ca73733331c2158b82..a3b7039df6040ee3687bbb7629e7fbc0e4b6d218 100644
--- a/src/dwyer.c
+++ b/src/dwyer.c
@@ -1,4 +1,4 @@
-#define POSTSCRIPT
+//#define POSTSCRIPT
 /****************************************************************/
 /*	DELAUNAY TRIANGULATION
 /*	VORONOI DIAGRAM
@@ -1203,14 +1203,12 @@ printf("[ ] 0 setdash\n");
 		vp[i] = i;
 		NORM(i) = X(i)*X(i) + Y(i)*Y(i);
 	}
-	free(sites);
+//	free(sites);
 
     n=i-1;
     vp[0] = 0; vp[n+1] = n+1;    /* sentinals for sorting routines */
 	vpsortx(1,n);
     delete_all_edges();
-    printf("test\n");
-    fflush(stdout);
     if (prog == 'g')
 	build_delaunay(vp, 1, n, &left, &right, n);
     else if (prog != 'c')
@@ -1238,5 +1236,12 @@ printf("[ ] 0 setdash\n");
 	    break;
 	    }
     }
+free(va);
+free(vp);
+free(org);
+free(len);
+free(hq);
+free(next);
+
 return 0;
 }
diff --git a/src/helper.c b/src/helper.c
index e596ae8911cf9b26bb418f99230fe64d7d514288..18bfaa8a03956bf49847f28a696baa78a3f7a016 100644
--- a/src/helper.c
+++ b/src/helper.c
@@ -11,7 +11,7 @@
 
 void svgDrawLine(vertex a, vertex b) {
 #ifdef OUTPUTFILE
-	fprintf(out, "<line vector-effect=\"non-scaling-stroke\" x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" style=\"stroke:red;stroke-width:1\" />\n", a.x, a.y, b.x, b.y);
+	fprintf(out, "<line vector-effect=\"non-scaling-stroke\" x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" style=\"stroke:blue;stroke-width:1\" />\n", a.x, a.y, b.x, b.y);
 #endif
 }
 
@@ -23,7 +23,7 @@ void svgDrawCircle(circle c) {
 
 void svgDrawTriangle(vertex a, vertex b, vertex c) {
 #ifdef OUTPUTFILE
-	fprintf(out, "<polygon vector-effect=\"non-scaling-stroke\" points=\"%f,%f %f,%f %f,%f\" style=\"fill:none;stroke:purple;stroke-width:1\" />\n", a.x, a.y, b.x, b.y, c.x, c.y);
+	fprintf(out, "<polygon vector-effect=\"non-scaling-stroke\" points=\"%f,%f %f,%f %f,%f\" style=\"fill:none;stroke:black;stroke-width:1\" />\n", a.x, a.y, b.x, b.y, c.x, c.y);
 #endif
 }
 
diff --git a/src/helper.h b/src/helper.h
index 85135460ee8dbed7bf76b8439bf253707ac64d42..c9eafc8ad40e5712d4e4c4b6312b74a31e4462d1 100644
--- a/src/helper.h
+++ b/src/helper.h
@@ -8,6 +8,9 @@
 #ifndef HELPER_H_
 #define HELPER_H_
 
+/**
+ * use if you want to have an output
+ */
 #define OUTPUTFILE "output.html"
 
 #include <stdio.h>
@@ -19,8 +22,8 @@ double viewboxMinX;
 double viewboxMinY;
 double viewboxMaxX;
 double viewboxMaxY;
-#define W 1000
-#define R .2
+#define W 400 //size of the svg-File
+#define R 1.0 //Point size
 #endif
 
 
diff --git a/src/main.c b/src/main.c
index 672244153fed30e6a7e117f1921487e3ad66d7cc..21c658c916f0e7073f68f26e79c9ba3130e109d8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,3 +1,13 @@
+
+/**
+ * use if you want to use command line input
+ */
+#define INPUT
+
+/**
+ * used for doing the Runtimetest
+ */
+//#define RUNTIMETEST
 /*
  * main.c
  *
@@ -8,27 +18,25 @@
 #include "main.h"
 
 /**
- * 1. function a=cws_delaunay b=cws_voronoi c=dwyer delaunay d=dwyer voronoi
+ * 1. function 0=cws_delaunay 1=cws_voronoi 2=dwyer delaunay 3=dwyer voronoi
  * 2. f if a file is used; g if sites should be generated
  * 3. if f: filelocation/filename; if g: number of sites to be generated
- * 4. number of executions
  * @param argc should be 5
  * @param argv parameters
  * @return
  */
 int main(int argc, char *argv[]) {
-	//input: 1. function a=cws_delaunay b=cws 2. # of points, 3. # of executions
 	int size;
-	char *function;
-	int executions = 1;
-	char *file;
+	int function;
 	vertex *points;
-	if(argc != 5) {
-		fprintf(stderr, "Input should have 5 Arguments.");
+#ifdef INPUT
+	char *file;
+	if(argc != 4) {
+		fprintf(stderr, "Input should have 4 Arguments.");
 		exit(EXIT_FAILURE);
 	}
 
-	//function = argv[0];
+	function = atoi(argv[1]);
 	if(argv[2][0] == 'f'){
 		file = argv[3];
 		readFile(file, &points, &size);
@@ -36,73 +44,96 @@ int main(int argc, char *argv[]) {
 		size = atoi(argv[3]);
 		points = malloc(size * sizeof(vertex));
 		generatePoints(points, size);
+#ifdef OUTPUTFILE
 		viewboxMinX = 0;
 		viewboxMinY = 0;
 		viewboxMaxX = 1;
 		viewboxMaxY = 1;
+#endif
 	}
-	executions = atoi(argv[4]);
-
+#endif
 
-	printf("%lu\n", size * sizeof(vertex));
 
 #ifdef OUTPUTFILE
 	out = fopen ( OUTPUTFILE, "w" );
 	writeSvgStart ( out );
-	drawSites(points, size);
+#endif
+#ifdef RUNTIMETEST
+	size = 2;
+	int line = 2;
+	printf(",cwsdel,cwsvon,dwydel,dwyvon,\n");
+	for(int k = 0; k < 18; k++) {
+		size *= 2;
+		printf("%d", size);
+		for(int i = 0; i < 10; i++) {
+		//	vertex points[size];
+			printf(",");
+			points = malloc(size * sizeof(vertex));
+			generatePoints(points, size);
+			for(function = 0; function < 4; function++) {
+				clock_t begin = clock();
 #endif
 
-	clock_t begin = clock();
-
-	switch(argv[1][0]){
-					case 'a':
-						for(int i = 0; i < executions; i++) {
-							delaunayCws(points, size);
-						}
+				switch(function){
+					case 0:
+						delaunayCws(points, size);
 						break;
-					case 'b':
-						for(int i = 0; i < executions; i++) {
-							voronoiCws(points, size);
-						}
+					case 1:
+						voronoiCws(points, size);
 						break;
-					case 'c':
-						for(int i = 0; i < executions; i++) {
-							dwyer('m', points, size);
-						}
+					case 2:
+						dwyer('m', points, size);
 						break;
-					case 'd':
-						for(int i = 0; i < executions; i++) {
-							dwyer('v', points, size);
-						}
+					case 3:
+						dwyer('v', points, size);
 						break;
 					default:
 						break;
-	}
+				}
 
-	clock_t end = clock();
+#ifdef RUNTIMETEST
+				clock_t end = clock();
+				double number_of_clocks = (double) (end-begin);
+				double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
 
-#ifdef OUTPUTFILE
-		writeSvgEnd ( out );
-		fclose(out);
+
+				printf("%f,", time_spent);
+			}
+			printf("\n");
+			line++;
+
+			free(points);
+		}
+		printf("average,=AVERAGE(B%d:B%d),=AVERAGE(C%d:C%d),=AVERAGE(D%d:D%d),=AVERAGE(E%d:E%d),\n", line-1, line-10, line-1, line-10, line-1, line-10, line-1, line-10);
+		printf("max,=MAX(B%d:B%d),=MAX(C%d:C%d),=MAX(D%d:D%d),=MAX(E%d:E%d),\n", line-1, line-10, line-1, line-10, line-1, line-10, line-1, line-10);
+		printf("min,=MIN(B%d:B%d),=MIN(C%d:C%d),=MIN(D%d:D%d),=MIN(E%d:E%d),\n", line-1, line-10, line-1, line-10, line-1, line-10, line-1, line-10);
+		line += 3;
+
+	}
 #endif
 
-	double number_of_clocks = (double) (end-begin);
-	double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
 
-	printf("Number of clocks: %f\n", number_of_clocks);
 
-	printf("Time spent: %f\n", time_spent);
+
+
+
+
+
+
+#ifdef OUTPUTFILE
+	drawSites(points, size);
+	writeSvgEnd ( out );
+	fclose(out);
+#endif
+
 	return EXIT_SUCCESS;
 }
 
 void generatePoints(vertex* points, int size) {
-	double x, y;
 	int seed = time(NULL);
 	srand(seed);
 	for(int i = 0; i < size; i++) {
-		x = (double) rand()/RAND_MAX;
-		y = (double) rand()/RAND_MAX;
-		points[i] = (vertex) {x, y};
+		points[i] = (vertex) {(double) rand()/RAND_MAX, (double) rand()/RAND_MAX};
 	}
 }
 
@@ -120,11 +151,14 @@ void readFile(char *file, vertex **v, int *size){
 	*v = malloc(*size * sizeof(vertex));
 	printf("Number of Points: %d\n", *size);
 	int i;
+#ifdef OUTPUTFILE
 	viewboxMinX = (*v)[0].x;
 	viewboxMinY = (*v)[0].y;
 	viewboxMaxX = (*v)[0].x;
 	viewboxMaxY = (*v)[0].y;
+#endif
 	for(i = 0; i < *size && fscanf(f, "%lf, %lf\n", &(*v)[i].x, &(*v)[i].y) == 2; i++) {
+#ifdef OUTPUTFILE
 		if(i == 0){
 			viewboxMinX = (*v)[0].x;
 			viewboxMinY = (*v)[0].y;
@@ -141,7 +175,7 @@ void readFile(char *file, vertex **v, int *size){
 		} else if((*v)[i].y > viewboxMaxY) {
 			viewboxMaxY = (*v)[i].y;
 		}
-		printf("%f\n", viewboxMinX);
+#endif
 	}
 
 	if(i != *size) {
diff --git a/src/voronoi.c b/src/voronoi.c
index e85ba99a4b3622ec3882a4232a4ca9ada06e892a..14f5f55ea1b439b30feb48831822c73e7330baf6 100644
--- a/src/voronoi.c
+++ b/src/voronoi.c
@@ -8,22 +8,11 @@
 #include "voronoi.h"
 
 
-circle center(vertexCircle vc) {
-
-	circle c = circleFrom3Points(vc.a, vc.b, vc.c);
-	return c;
-}
 int reportEdge(vertex a, vertex b) {
-	//svgDrawCircle(a,out);
-	//svgDrawCircle(b,out);
 	svgDrawLine(a, b);
 	return 0;
 }
 
-vertex vertexCircle2vertex(vertexCircle vc) {
-	vertex v = center(vc).center;
-	return v;
-}
 
 /**
  * returns the vertex, that you get, when you go right from the center of a and b until you hit the border of the room, where the points are
diff --git a/src/voronoi.h b/src/voronoi.h
index 5f8a6a1b043b1da364a48dbc17dc7c0c6e6fde68..97538de3e8c86932016794dc74f5c7e065f5c884 100644
--- a/src/voronoi.h
+++ b/src/voronoi.h
@@ -11,45 +11,11 @@
 #include "delaunay.h"
 #include "helper.h"
 
-
-/**
- * a vertex represented by a circle, where it is the center
- */
-typedef struct {
-	vertex a;
-	vertex b;
-	vertex c;
-} vertexCircle;
-
-//TODO better name
-/**
- * an edge represented by 2 vertexCircles
- */
-typedef struct {
-	vertexCircle a;
-	vertexCircle b;
-} edgeCircle;
-
-/**
- * returns  the  first  Voronoi  vertex  on  the  boundary  of  the Voronoi region associated with the point p e S
- * @param point p e S
- * @return the  first  Voronoi  vertex  on  the  boundary  of  the Voronoi region associated with p
- */
-vertexCircle firstVoronoiVertexAssociatedWith(vertex p);
-
 /**
- * returns  the  next  Voronoi  edge incident to e.a, following e in the clockwise direction
- * @param e
- * @return
+ * use, if you want to Draw the dual Delaunay-Triangulation together with the Voronoi-Diagram
  */
-edgeCircle clockwiseNextVoronoiEdge(edgeCircle e);
+//#define DEL
 
-/**
- * returns  the  Voronoi  edge following e along the boundary of its Voronoi region
- * @param e
- * @return
- */
-edgeCircle nextVoronoiEdgeOnBoudary(edgeCircle e);
 
 int reportEdge(vertex, vertex);