Index: branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithm.java
===================================================================
--- branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithm.java	(revision 1596)
+++ branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithm.java	(revision 1612)
@@ -3,6 +3,10 @@
 import java.util.ArrayList;
 
+import de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix;
+
 public interface AlignmentAlgorithm {
 
+	public abstract void align(int[] input1, int[] input2, SubstitutionMatrix submat,float threshold);
+	
 	/**
 	 * Get the alignment score between the two input strings.
Index: branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithmFactory.java
===================================================================
--- branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithmFactory.java	(revision 1596)
+++ branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithmFactory.java	(revision 1612)
@@ -1,3 +1,6 @@
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 
 import de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix;
@@ -5,10 +8,28 @@
 public class AlignmentAlgorithmFactory {
 	
+	public static void setDefaultAlgorithm(String algorithmname) {
+		//TODO: check for valid algorihm class names here
+		algorithmclass = algorithmname;
+	}
 	
-	public static AlignmentAlgorithm create(int[] input1, int[] input2, SubstitutionMatrix submat,float threshold) {
-		
+	private static String algorithmclass = "de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated";
+	
+	
+	
+	public static AlignmentAlgorithm create() {
+		Class<?> newclass;
+		Object object = null;
+		try {
+			 newclass = Class.forName(algorithmclass);
+			 object = newclass.newInstance();
+			
+		} catch (ClassNotFoundException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
 		//return new SmithWaterman(input1,input2,submat,threshold);
 		//return new NeedlemanWunsch(input1,input2,submat,threshold);
-		return new SmithWatermanRepeated(input1,input2,submat,threshold);
+		//return new SmithWatermanRepeated(input1,input2,submat,threshold);
+		return (AlignmentAlgorithm) object;
 	}
 }
Index: branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NeedlemanWunsch.java
===================================================================
--- branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NeedlemanWunsch.java	(revision 1596)
+++ branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NeedlemanWunsch.java	(revision 1612)
@@ -39,28 +39,4 @@
 	private SubstitutionMatrix submat;
 
-	public NeedlemanWunsch(int[] input1, int[] input2, SubstitutionMatrix submat,
-			float threshold) {
-		this.input1 = input1;
-		this.input2 = input2;
-		length1 = input1.length;
-		length2 = input2.length;
-		this.submat = submat;
-
-		// System.out.println("Starting SmithWaterman algorithm with a "
-		// + submat.getClass() + " Substitution Matrix: " +
-		// submat.getClass().getCanonicalName());
-
-		matrix = new MatrixEntry[length1 + 1][length2 + 1];
-		alignment = new ArrayList<NumberSequence>();
-
-		for (int i = 0; i < length1+1; i++) {
-			for (int j = 0; j < length2+1; j++) {
-				matrix[i][j] = new MatrixEntry();
-			}
-		}
-
-		buildMatrix();
-		traceback();
-	}
 
 	/**
@@ -289,4 +265,31 @@
 	}
 
+	@Override
+	public void align(int[] input1, int[] input2, SubstitutionMatrix submat,
+			float threshold) {
+		this.input1 = input1;
+		this.input2 = input2;
+		length1 = input1.length;
+		length2 = input2.length;
+		this.submat = submat;
+
+		// System.out.println("Starting SmithWaterman algorithm with a "
+		// + submat.getClass() + " Substitution Matrix: " +
+		// submat.getClass().getCanonicalName());
+
+		matrix = new MatrixEntry[length1 + 1][length2 + 1];
+		alignment = new ArrayList<NumberSequence>();
+
+		for (int i = 0; i < length1+1; i++) {
+			for (int j = 0; j < length2+1; j++) {
+				matrix[i][j] = new MatrixEntry();
+			}
+		}
+
+		buildMatrix();
+		traceback();
+		
+	}
+
 
 
Index: branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWaterman.java
===================================================================
--- branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWaterman.java	(revision 1596)
+++ branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWaterman.java	(revision 1612)
@@ -38,28 +38,4 @@
 	private SubstitutionMatrix submat;
 
-	public SmithWaterman(int[] input1, int[] input2, SubstitutionMatrix submat,
-			float threshold) {
-		this.input1 = input1;
-		this.input2 = input2;
-		length1 = input1.length;
-		length2 = input2.length;
-		this.submat = submat;
-
-		// System.out.println("Starting SmithWaterman algorithm with a "
-		// + submat.getClass() + " Substitution Matrix: " +
-		// submat.getClass().getCanonicalName());
-
-		matrix = new MatrixEntry[length1 + 1][length2 + 1];
-		alignment = new ArrayList<NumberSequence>();
-
-		for (int i = 0; i < length1+1; i++) {
-			for (int j = 0; j < length2+1; j++) {
-				matrix[i][j] = new MatrixEntry();
-			}
-		}
-
-		buildMatrix();
-		traceback();
-	}
 
 	/**
@@ -294,3 +270,30 @@
 	}
 
+	@Override
+	public void align(int[] input1, int[] input2, SubstitutionMatrix submat,
+			float threshold) {
+		this.input1 = input1;
+		this.input2 = input2;
+		length1 = input1.length;
+		length2 = input2.length;
+		this.submat = submat;
+
+		// System.out.println("Starting SmithWaterman algorithm with a "
+		// + submat.getClass() + " Substitution Matrix: " +
+		// submat.getClass().getCanonicalName());
+
+		matrix = new MatrixEntry[length1 + 1][length2 + 1];
+		alignment = new ArrayList<NumberSequence>();
+
+		for (int i = 0; i < length1+1; i++) {
+			for (int j = 0; j < length2+1; j++) {
+				matrix[i][j] = new MatrixEntry();
+			}
+		}
+
+		buildMatrix();
+		traceback();
+		
+	}
+
 }
Index: branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeated.java
===================================================================
--- branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeated.java	(revision 1596)
+++ branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeated.java	(revision 1612)
@@ -43,27 +43,6 @@
 	private SubstitutionMatrix submat;
 
-	public SmithWatermanRepeated(int[] input1, int[] input2, SubstitutionMatrix submat,float threshold) {
-		this.input1 = input1;
-		this.input2 = input2;
-		length1 = input1.length;
-		length2 = input2.length;
-		this.submat = submat;
-
-		//System.out.println("Starting SmithWaterman algorithm with a "
-		//		+ submat.getClass() + " Substitution Matrix: " + submat.getClass().getCanonicalName());
-		this.scoreThreshold = threshold;
-		
-		matrix = new MatrixEntry[length1+2][length2+1];
-		alignment = new ArrayList<NumberSequence>();
-		
-		for (int i = 0; i <= length1+1; i++) {
-			for(int j = 0; j< length2; j++) {
-				matrix[i][j] = new MatrixEntry();
-			}
-		}
-	
-
-		buildMatrix();
-		traceback();
+	public SmithWatermanRepeated() {
+	
 	}
 
@@ -374,3 +353,30 @@
 	}
 
+	@Override
+	public void align(int[] input1, int[] input2, SubstitutionMatrix submat,
+			float threshold) {
+		this.input1 = input1;
+		this.input2 = input2;
+		length1 = input1.length;
+		length2 = input2.length;
+		this.submat = submat;
+
+		//System.out.println("Starting SmithWaterman algorithm with a "
+		//		+ submat.getClass() + " Substitution Matrix: " + submat.getClass().getCanonicalName());
+		this.scoreThreshold = threshold;
+		
+		matrix = new MatrixEntry[length1+2][length2+1];
+		alignment = new ArrayList<NumberSequence>();
+		
+		for (int i = 0; i <= length1+1; i++) {
+			for(int j = 0; j< length2; j++) {
+				matrix[i][j] = new MatrixEntry();
+			}
+		}
+	
+
+		buildMatrix();
+		traceback();
+	}
+
 }
