Index: trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceTrieTest.java
===================================================================
--- trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceTrieTest.java	(revision 1294)
+++ trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceTrieTest.java	(revision 1846)
@@ -26,7 +26,7 @@
 import de.ugoe.cs.autoquest.tasktrees.TaskTreeDecoder;
 import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskBuilder;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession;
 import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskBuilder;
@@ -114,20 +114,24 @@
         fixture.trainSessions(Arrays.asList(session), 2);
         
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2))));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2).getTask())));
         
         // subsequences of length 1 are not trained. So for the single item sequence of the last
         // task, the count must be 0
-        assertEquals(0, fixture.getCount(Arrays.asList(session.get(3))));
-        
-        
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0), session.get(1))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1), session.get(2))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2), session.get(3))));
+        assertEquals(0, fixture.getCount(Arrays.asList(session.get(3).getTask())));
+        
+        
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask(),
+                                                       session.get(2).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         // this must return 0 as we only trained shorter sequences
-        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2))));
+        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask())));
         
         // subsequences of length 1 are not trained. So the single item sequence of the last
@@ -153,14 +157,16 @@
             // subsequences of length 1 are not trained. So the single item sequence of the last
             // task is not counted. Therefore, the result must be 3
-            assertEquals(3, fixture.getCount(Arrays.asList(session.get(i))));
+            assertEquals(3, fixture.getCount(Arrays.asList(session.get(i).getTask())));
             
             for (int j = 0; j < session.size(); j++) {
-                assertEquals(3, fixture.getCount(Arrays.asList(session.get(i), session.get(j))));
+                assertEquals(3, fixture.getCount(Arrays.asList(session.get(i).getTask(),
+                                                               session.get(j).getTask())));
             }
         }
             
         // this must return 0 as we only trained shorter sequences
-        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2))));
+        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask())));
         
         assertEquals(1, fixture.getNumSymbols());
@@ -183,16 +189,20 @@
         // subsequences of length 1 are not trained. So the single item sequence of the last
         // task is not counted. Therefore, the result must be 3
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1))));
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(3))));
-        
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0), session.get(1))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1), session.get(2))));
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2), session.get(3))));
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask())));
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(3).getTask())));
+        
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask(),
+                                                       session.get(2).getTask())));
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         // this must return 0 as we only trained shorter sequences
-        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2))));
+        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask())));
         
         assertEquals(2, fixture.getNumSymbols());
@@ -213,25 +223,32 @@
         fixture.trainSessions(Arrays.asList(session), 3);
         
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2))));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2).getTask())));
         
         // subsequences of length 1 are not trained. So for the single item sequence of the last
         // task, the count must be 0
-        assertEquals(0, fixture.getCount(Arrays.asList(session.get(3))));
-        
-        
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0), session.get(1))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1), session.get(2))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2), session.get(3))));
-        
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1), session.get(2),
-                                                       session.get(3))));
+        assertEquals(0, fixture.getCount(Arrays.asList(session.get(3).getTask())));
+        
+        
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask(),
+                                                       session.get(2).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2).getTask(),
+                                                       session.get(3).getTask())));
+        
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask(),
+                                                       session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         // we only trained shorter sequences, so we expect a count of 0 for longer ones
-        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2), session.get(3))));
+        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         // subsequences of length 1 are not trained. So the single item sequence of the last
@@ -257,12 +274,14 @@
             // subsequences of length 1 are not trained. So the single item sequence of the last
             // task is not counted. Therefore, the result must be 3
-            assertEquals(3, fixture.getCount(Arrays.asList(session.get(i))));
+            assertEquals(3, fixture.getCount(Arrays.asList(session.get(i).getTask())));
             
             for (int j = 0; j < session.size(); j++) {
-                assertEquals(3, fixture.getCount(Arrays.asList(session.get(i), session.get(j))));
+                assertEquals(3, fixture.getCount(Arrays.asList(session.get(i).getTask(),
+                                                               session.get(j).getTask())));
                 
                 for (int k = 0; k < session.size(); k++) {
-                    assertEquals(2, fixture.getCount(Arrays.asList(session.get(i), session.get(j),
-                                                                   session.get(k))));                    
+                    assertEquals(2, fixture.getCount(Arrays.asList(session.get(i).getTask(),
+                                                                   session.get(j).getTask(),
+                                                                   session.get(k).getTask())));                    
                 }
             }
@@ -270,6 +289,8 @@
             
         // we only trained shorter sequences, so we expect a count of 0 for longer ones
-        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2), session.get(3))));
+        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         assertEquals(1, fixture.getNumSymbols());
@@ -292,21 +313,28 @@
         // subsequences of length 1 are not trained. So the single item sequence of the last
         // task is not counted. Therefore, the result must be 3
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1))));
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(3))));
-        
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0), session.get(1))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1), session.get(2))));
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2), session.get(3))));
-        
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1), session.get(2),
-                                                       session.get(3))));
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask())));
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(3).getTask())));
+        
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask(),
+                                                       session.get(2).getTask())));
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2).getTask(),
+                                                       session.get(3).getTask())));
+        
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask(),
+                                                       session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         // we only trained shorter sequences, so we expect a count of 0 for longer ones
-        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2), session.get(3))));
+        assertEquals(0, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         assertEquals(2, fixture.getNumSymbols());
@@ -327,25 +355,32 @@
         fixture.trainSessions(Arrays.asList(session), 4);
         
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2))));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2).getTask())));
         
         // subsequences of length 1 are not trained. So for the single item sequence of the last
         // task, the count must be 0
-        assertEquals(0, fixture.getCount(Arrays.asList(session.get(3))));
-        
-        
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0), session.get(1))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1), session.get(2))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2), session.get(3))));
-        
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1), session.get(2),
-                                                       session.get(3))));
+        assertEquals(0, fixture.getCount(Arrays.asList(session.get(3).getTask())));
+        
+        
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask(),
+                                                       session.get(2).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(2).getTask(),
+                                                       session.get(3).getTask())));
+        
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask(),
+                                                       session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         // we only trained shorter sequences, so we expect a count of 0 for longer ones
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2), session.get(3))));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         // subsequences of length 1 are not trained. So the single item sequence of the last
@@ -371,12 +406,14 @@
             // subsequences of length 1 are not trained. So the single item sequence of the last
             // task is not counted. Therefore, the result must be 3
-            assertEquals(3, fixture.getCount(Arrays.asList(session.get(i))));
+            assertEquals(3, fixture.getCount(Arrays.asList(session.get(i).getTask())));
             
             for (int j = 0; j < session.size(); j++) {
-                assertEquals(3, fixture.getCount(Arrays.asList(session.get(i), session.get(j))));
+                assertEquals(3, fixture.getCount(Arrays.asList(session.get(i).getTask(),
+                                                               session.get(j).getTask())));
                 
                 for (int k = 0; k < session.size(); k++) {
-                    assertEquals(2, fixture.getCount(Arrays.asList(session.get(i), session.get(j),
-                                                                   session.get(k))));                    
+                    assertEquals(2, fixture.getCount(Arrays.asList(session.get(i).getTask(),
+                                                                   session.get(j).getTask(),
+                                                                   session.get(k).getTask())));                    
                 }
             }
@@ -384,6 +421,8 @@
             
         // we only trained shorter sequences, so we expect a count of 0 for longer ones
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2), session.get(3))));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         assertEquals(1, fixture.getNumSymbols());
@@ -406,21 +445,28 @@
         // subsequences of length 1 are not trained. So the single item sequence of the last
         // task is not counted. Therefore, the result must be 3
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1))));
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(3))));
-        
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0), session.get(1))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1), session.get(2))));
-        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2), session.get(3))));
-        
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2))));
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1), session.get(2),
-                                                       session.get(3))));
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask())));
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(3).getTask())));
+        
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask(),
+                                                       session.get(2).getTask())));
+        assertEquals(2, fixture.getCount(Arrays.asList(session.get(2).getTask(),
+                                                       session.get(3).getTask())));
+        
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask())));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(1).getTask(),
+                                                       session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         // we only trained shorter sequences, so we expect a count of 0 for longer ones
-        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0), session.get(1),
-                                                       session.get(2), session.get(3))));
+        assertEquals(1, fixture.getCount(Arrays.asList(session.get(0).getTask(),
+                                                       session.get(1).getTask(),
+                                                       session.get(2).getTask(),
+                                                       session.get(3).getTask())));
         
         assertEquals(2, fixture.getNumSymbols());
@@ -435,12 +481,12 @@
 
         // get all sequences with a minimal length of one that occur most often
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(1, 0);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(1, 0);
 
         assertEquals(1, result.size());
         
-        List<ITaskInstance> expected = new ArrayList<ITaskInstance>();
-        expected.add(session.get(0));
-        
-        assertContains((List<List<ITaskInstance>>) result, expected);
+        List<ITask> expected = new ArrayList<ITask>();
+        expected.add(session.get(0).getTask());
+        
+        assertContains((List<List<ITask>>) result, expected);
     }
 
@@ -452,60 +498,60 @@
 
         // get all sequences with a minimal length of one that occur exactly once
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(1, 1);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(1, 1);
 
         assertEquals(11, result.size());
 
-        List<ITaskInstance> expected = new ArrayList<ITaskInstance>();
-        expected.add(session.get(2)); //r
-        expected.add(session.get(0)); //a
-        expected.add(session.get(4)); //c
+        List<ITask> expected = new ArrayList<ITask>();
+        expected.add(session.get(2).getTask()); //r
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(4).getTask()); //c
         // rac
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(0)); //a
-        expected.add(session.get(4)); //c
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(4).getTask()); //c
         // ac
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(0).getTask()); //a
         // aca
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(4)); //c
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(4).getTask()); //c
         // c
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(0).getTask()); //a
         // ca
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(6)); //d
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(6).getTask()); //d
         // cad
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(0)); //a
-        expected.add(session.get(6)); //d
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(6).getTask()); //d
         // ad
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(0).getTask()); //a
         // ada
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(6)); //d
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(6).getTask()); //d
         // d
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(0).getTask()); //a
         // da
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(1)); //b
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(1).getTask()); //b
         // dab
-        assertContains((List<List<ITaskInstance>>) result, expected);
+        assertContains((List<List<ITask>>) result, expected);
     }
 
@@ -517,39 +563,39 @@
 
         // get all sequences with a minimal length of one that occur exactly twice
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(1, 2);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(1, 2);
 
         assertEquals(7, result.size());
 
-        List<ITaskInstance> expected = new ArrayList<ITaskInstance>();
-        expected.add(session.get(0)); //a
-        expected.add(session.get(1)); //b
+        List<ITask> expected = new ArrayList<ITask>();
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(1).getTask()); //b
         // ab
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(2)); //r
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(2).getTask()); //r
         // abr
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(1)); //b
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(1).getTask()); //b
         // b
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(2)); //r
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(2).getTask()); //r
         // br
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(0).getTask()); //a
         // bra
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(2)); //r
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(2).getTask()); //r
         // r
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(0).getTask()); //a
         // ra
-        assertContains((List<List<ITaskInstance>>) result, expected);
+        assertContains((List<List<ITask>>) result, expected);
     }
 
@@ -561,5 +607,5 @@
 
         // get all sequences with a minimal length of one that occur exactly three times
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(1, 3);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(1, 3);
 
         assertEquals(0, result.size());
@@ -573,12 +619,12 @@
 
         // get all sequences with a minimal length of one that occur exactly four times
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(1, 4);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(1, 4);
 
         // as we did not train the last single action, we may expect the "a" action only 4 times
         assertEquals(1, result.size());
 
-        List<ITaskInstance> expected = new ArrayList<ITaskInstance>();
-        expected.add(session.get(0)); //a
-        assertContains((List<List<ITaskInstance>>) result, expected);
+        List<ITask> expected = new ArrayList<ITask>();
+        expected.add(session.get(0).getTask()); //a
+        assertContains((List<List<ITask>>) result, expected);
     }
 
@@ -590,5 +636,5 @@
 
         // get all sequences with a minimal length of one that occur exactly five times
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(1, 5);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(1, 5);
 
         // as we did not train the last single action, we may expect the "a" action only 4 times
@@ -603,28 +649,28 @@
 
         // get all sequences with a minimal length of two that occur most often
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(2, 0);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(2, 0);
 
         assertEquals(5, result.size());
 
-        List<ITaskInstance> expected = new ArrayList<ITaskInstance>();
-        expected.add(session.get(0)); //a
-        expected.add(session.get(1)); //b
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(2)); //r
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(1)); //b
-        expected.add(session.get(2)); //r
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(0)); //a
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(2)); //r
-        expected.add(session.get(0)); //a
-        assertContains((List<List<ITaskInstance>>) result, expected);
+        List<ITask> expected = new ArrayList<ITask>();
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(1).getTask()); //b
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(2).getTask()); //r
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(1).getTask()); //b
+        expected.add(session.get(2).getTask()); //r
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(0).getTask()); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(2).getTask()); //r
+        expected.add(session.get(0).getTask()); //a
+        assertContains((List<List<ITask>>) result, expected);
     }
 
@@ -636,54 +682,54 @@
 
         // get all sequences with a minimal length of two that occur exactly once
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(2, 1);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(2, 1);
 
         assertEquals(9, result.size());
 
-        List<ITaskInstance> expected = new ArrayList<ITaskInstance>();
-        expected.add(session.get(2)); //r
-        expected.add(session.get(0)); //a
-        expected.add(session.get(4)); //c
+        List<ITask> expected = new ArrayList<ITask>();
+        expected.add(session.get(2).getTask()); //r
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(4).getTask()); //c
         // rac
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(0)); //a
-        expected.add(session.get(4)); //c
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(4).getTask()); //c
         // ac
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(0).getTask()); //a
         // aca
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(4)); //c
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(4).getTask()); //c
+        expected.add(session.get(0).getTask()); //a
         // ca
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(6)); //d
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(6).getTask()); //d
         // cad
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(0)); //a
-        expected.add(session.get(6)); //d
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(6).getTask()); //d
         // ad
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(0).getTask()); //a
         // ada
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(6)); //d
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(6).getTask()); //d
+        expected.add(session.get(0).getTask()); //a
         // da
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(1)); //b
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(1).getTask()); //b
         // dab
-        assertContains((List<List<ITaskInstance>>) result, expected);
+        assertContains((List<List<ITask>>) result, expected);
     }
 
@@ -695,33 +741,33 @@
 
         // get all sequences with a minimal length of two that occur exactly twice
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(2, 2);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(2, 2);
 
         assertEquals(5, result.size());
 
-        List<ITaskInstance> expected = new ArrayList<ITaskInstance>();
-        expected.add(session.get(0)); //a
-        expected.add(session.get(1)); //b
+        List<ITask> expected = new ArrayList<ITask>();
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(1).getTask()); //b
         // ab
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(2)); //r
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(2).getTask()); //r
         // abr
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(1)); //b
-        expected.add(session.get(2)); //r
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(1).getTask()); //b
+        expected.add(session.get(2).getTask()); //r
         // br
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.add(session.get(0).getTask()); //a
         // bra
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(2)); //r
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(2).getTask()); //r
+        expected.add(session.get(0).getTask()); //a
         // ra
-        assertContains((List<List<ITaskInstance>>) result, expected);
+        assertContains((List<List<ITask>>) result, expected);
     }
 
@@ -733,5 +779,5 @@
 
         // get all sequences with a minimal length of two that occur exactly three times
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(2, 3);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(2, 3);
 
         assertEquals(0, result.size());
@@ -745,19 +791,19 @@
 
         // get all sequences with a minimal length of three that occur most often
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(3, 0);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(3, 0);
 
         assertEquals(2, result.size());
 
-        List<ITaskInstance> expected = new ArrayList<ITaskInstance>();
-        expected.add(session.get(0)); //a
-        expected.add(session.get(1)); //b
-        expected.add(session.get(2)); //r
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(1)); //b
-        expected.add(session.get(2)); //r
-        expected.add(session.get(0)); //a
-        assertContains((List<List<ITaskInstance>>) result, expected);
+        List<ITask> expected = new ArrayList<ITask>();
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(1).getTask()); //b
+        expected.add(session.get(2).getTask()); //r
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(1).getTask()); //b
+        expected.add(session.get(2).getTask()); //r
+        expected.add(session.get(0).getTask()); //a
+        assertContains((List<List<ITask>>) result, expected);
     }
 
@@ -769,42 +815,42 @@
 
         // get all sequences with a minimal length of three that occur exactly once
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(3, 1);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(3, 1);
 
         assertEquals(5, result.size());
 
-        List<ITaskInstance> expected = new ArrayList<ITaskInstance>();
-        expected.add(session.get(2)); //r
-        expected.add(session.get(0)); //a
-        expected.add(session.get(4)); //c
+        List<ITask> expected = new ArrayList<ITask>();
+        expected.add(session.get(2).getTask()); //r
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(4).getTask()); //c
         // rac
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(0)); //a
-        expected.add(session.get(4)); //c
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(4).getTask()); //c
+        expected.add(session.get(0).getTask()); //a
         // aca
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(4)); //c
-        expected.add(session.get(0)); //a
-        expected.add(session.get(6)); //d
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(4).getTask()); //c
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(6).getTask()); //d
         // cad
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(0)); //a
-        expected.add(session.get(6)); //d
-        expected.add(session.get(0)); //a
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(6).getTask()); //d
+        expected.add(session.get(0).getTask()); //a
         // ada
-        assertContains((List<List<ITaskInstance>>) result, expected);
-
-        expected.clear();
-        expected.add(session.get(6)); //d
-        expected.add(session.get(0)); //a
-        expected.add(session.get(1)); //b
+        assertContains((List<List<ITask>>) result, expected);
+
+        expected.clear();
+        expected.add(session.get(6).getTask()); //d
+        expected.add(session.get(0).getTask()); //a
+        expected.add(session.get(1).getTask()); //b
         // dab
-        assertContains((List<List<ITaskInstance>>) result, expected);
+        assertContains((List<List<ITask>>) result, expected);
     }
 
@@ -816,5 +862,5 @@
 
         // get all sequences with a minimal length of four that occur most often
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(4, 0);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(4, 0);
 
         // none of these exist, as the tree is only trained with sequences of length 3
@@ -829,5 +875,5 @@
 
         // get all sequences with a minimal length of four that occur exactly once
-        Collection<List<ITaskInstance>> result = fixture.getSequencesWithOccurrenceCount(4, 1);
+        Collection<List<ITask>> result = fixture.getSequencesWithOccurrenceCount(4, 1);
 
         // none of these exist, as the tree is only trained with sequences of length 3
@@ -841,6 +887,6 @@
         fixture.trainSessions(Arrays.asList(session), 3);
 
-        List<ITaskInstance> subSequence = new ArrayList<ITaskInstance>();
-        subSequence.add(session.get(0)); //a
+        List<ITask> subSequence = new ArrayList<ITask>();
+        subSequence.add(session.get(0).getTask()); //a
 
         int result = fixture.getCount(subSequence);
@@ -856,7 +902,7 @@
         fixture.trainSessions(Arrays.asList(session), 3);
 
-        List<ITaskInstance> subSequence = new ArrayList<ITaskInstance>();
-        subSequence.add(session.get(0)); //a
-        subSequence.add(session.get(1)); //b
+        List<ITask> subSequence = new ArrayList<ITask>();
+        subSequence.add(session.get(0).getTask()); //a
+        subSequence.add(session.get(1).getTask()); //b
 
         int result = fixture.getCount(subSequence);
@@ -871,6 +917,6 @@
         fixture.trainSessions(Arrays.asList(session), 3);
 
-        List<ITaskInstance> subSequence = new ArrayList<ITaskInstance>();
-        subSequence.add(taskFactory.createNewTaskInstance(taskFactory.createNewSequence()));
+        List<ITask> subSequence = new ArrayList<ITask>();
+        subSequence.add(taskFactory.createNewSequence());
 
         int result = fixture.getCount(subSequence);
@@ -885,7 +931,7 @@
         fixture.trainSessions(Arrays.asList(session), 3);
 
-        List<ITaskInstance> subSequence = new ArrayList<ITaskInstance>();
-
-        int result = fixture.getCount(subSequence, session.get(0)); //a
+        List<ITask> subSequence = new ArrayList<ITask>();
+
+        int result = fixture.getCount(subSequence, session.get(0).getTask()); //a
 
         // as we did not train the last single action, we may expect the "a" action only 4 times
@@ -899,9 +945,9 @@
         fixture.trainSessions(Arrays.asList(session), 3);
 
-        List<ITaskInstance> subSequence = new ArrayList<ITaskInstance>();
-        subSequence.add(session.get(0)); //a
-        subSequence.add(session.get(1)); //b
-
-        int result = fixture.getCount(subSequence, session.get(2)); //r
+        List<ITask> subSequence = new ArrayList<ITask>();
+        subSequence.add(session.get(0).getTask()); //a
+        subSequence.add(session.get(1).getTask()); //b
+
+        int result = fixture.getCount(subSequence, session.get(2).getTask()); //r
 
         assertEquals(2, result);
@@ -914,8 +960,8 @@
         fixture.trainSessions(Arrays.asList(session), 3);
 
-        List<ITaskInstance> subSequence = new ArrayList<ITaskInstance>();
+        List<ITask> subSequence = new ArrayList<ITask>();
 
         int result = fixture.getCount
-            (subSequence, taskFactory.createNewTaskInstance(taskFactory.createNewSequence()));
+            (subSequence, taskFactory.createNewSequence());
 
         assertEquals(0, result);
@@ -928,12 +974,12 @@
         fixture.trainSessions(Arrays.asList(session), 3);
 
-        List<ITaskInstance> subSequence = new ArrayList<ITaskInstance>();
-        subSequence.add(session.get(0)); //a
-        Collection<ITaskInstance> expected = new ArrayList<ITaskInstance>();
-        expected.add(session.get(1)); //b
-        expected.add(session.get(4)); //c
-        expected.add(session.get(6)); //d
-
-        Collection<ITaskInstance> result = fixture.getFollowingSymbols(subSequence);
+        List<ITask> subSequence = new ArrayList<ITask>();
+        subSequence.add(session.get(0).getTask()); //a
+        Collection<ITask> expected = new ArrayList<ITask>();
+        expected.add(session.get(1).getTask()); //b
+        expected.add(session.get(4).getTask()); //c
+        expected.add(session.get(6).getTask()); //d
+
+        Collection<ITask> result = fixture.getFollowingSymbols(subSequence);
 
         assertCollectionContent(expected, result);
@@ -946,10 +992,10 @@
         fixture.trainSessions(Arrays.asList(session), 3);
 
-        List<ITaskInstance> subSequence = new ArrayList<ITaskInstance>();
-        subSequence.add(session.get(0)); //a
-        subSequence.add(session.get(1)); //b
-        subSequence.add(session.get(2)); //r
-
-        Collection<ITaskInstance> result = fixture.getFollowingSymbols(subSequence);
+        List<ITask> subSequence = new ArrayList<ITask>();
+        subSequence.add(session.get(0).getTask()); //a
+        subSequence.add(session.get(1).getTask()); //b
+        subSequence.add(session.get(2).getTask()); //r
+
+        Collection<ITask> result = fixture.getFollowingSymbols(subSequence);
 
         assertEquals(0, result.size());
@@ -962,8 +1008,8 @@
         fixture.trainSessions(Arrays.asList(session), 3);
 
-        List<ITaskInstance> subSequence = new ArrayList<ITaskInstance>();
-        subSequence.add(taskFactory.createNewTaskInstance(taskFactory.createNewSequence()));
-
-        Collection<ITaskInstance> result = fixture.getFollowingSymbols(subSequence);
+        List<ITask> subSequence = new ArrayList<ITask>();
+        subSequence.add(taskFactory.createNewSequence());
+
+        Collection<ITask> result = fixture.getFollowingSymbols(subSequence);
 
         assertEquals(0, result.size());
@@ -1010,5 +1056,5 @@
         int order = 2;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(3, 50, order);
+        TaskTrieTester tester = new TaskTrieTester(3, 50, order);
 
         long start = System.currentTimeMillis();
@@ -1030,5 +1076,5 @@
         int order = 2;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(3, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(3, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1050,5 +1096,5 @@
         int order = 2;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(30, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(30, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1070,5 +1116,5 @@
         int order = 2;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(300, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(300, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1090,5 +1136,5 @@
         int order = 2;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(1000, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(1000, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1110,5 +1156,5 @@
         int order = 3;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(3, 50, order);
+        TaskTrieTester tester = new TaskTrieTester(3, 50, order);
 
         long start = System.currentTimeMillis();
@@ -1130,5 +1176,5 @@
         int order = 3;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(3, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(3, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1150,5 +1196,5 @@
         int order = 3;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(30, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(30, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1170,5 +1216,5 @@
         int order = 3;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(300, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(300, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1190,5 +1236,5 @@
         int order = 3;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(1000, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(1000, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1210,5 +1256,5 @@
         int order = 4;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(3, 50, order);
+        TaskTrieTester tester = new TaskTrieTester(3, 50, order);
 
         long start = System.currentTimeMillis();
@@ -1230,5 +1276,5 @@
         int order = 4;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(3, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(3, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1250,5 +1296,5 @@
         int order = 4;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(30, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(30, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1270,5 +1316,5 @@
         int order = 4;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(300, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(300, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1290,5 +1336,5 @@
         int order = 4;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(1000, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(1000, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1310,5 +1356,5 @@
         int order = 5;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(3, 50, order);
+        TaskTrieTester tester = new TaskTrieTester(3, 50, order);
 
         long start = System.currentTimeMillis();
@@ -1330,5 +1376,5 @@
         int order = 5;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(3, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(3, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1350,5 +1396,5 @@
         int order = 5;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(30, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(30, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1370,5 +1416,5 @@
         int order = 5;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(300, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(300, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1390,5 +1436,5 @@
         int order = 5;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(1000, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(1000, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1410,5 +1456,5 @@
         int order = 6;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(3, 50, order);
+        TaskTrieTester tester = new TaskTrieTester(3, 50, order);
 
         long start = System.currentTimeMillis();
@@ -1430,5 +1476,5 @@
         int order = 6;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(3, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(3, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1450,5 +1496,5 @@
         int order = 6;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(30, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(30, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1470,5 +1516,5 @@
         int order = 6;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(300, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(300, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1490,5 +1536,5 @@
         int order = 6;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(1000, 10000, order);
+        TaskTrieTester tester = new TaskTrieTester(1000, 10000, order);
 
         long start = System.currentTimeMillis();
@@ -1510,5 +1556,5 @@
         int order = 3;
         
-        TaskInstanceTrieTester tester = new TaskInstanceTrieTester(1000, 100000, order);
+        TaskTrieTester tester = new TaskTrieTester(1000, 100000, order);
 
         long start = System.currentTimeMillis();
@@ -1527,9 +1573,9 @@
      * 
      */
-    private void assertContains(List<List<ITaskInstance>> listOfList,
-                                List<ITaskInstance>       containedList)
+    private void assertContains(List<List<ITask>> listOfList,
+                                List<ITask>       containedList)
     {
         boolean found = false;
-        for (List<ITaskInstance> candidate : listOfList) {
+        for (List<ITask> candidate : listOfList) {
             if (candidate.size() == containedList.size()) {
                 found = true;
@@ -1561,10 +1607,10 @@
      * @author Patrick Harms
      */
-    private class TaskInstanceTrieTester implements TrieProcessor<ITaskInstance> {
+    private class TaskTrieTester implements TrieProcessor<ITask> {
         
         /**
          * the symbols used for testing the trie
          */
-        private Map<Integer, ITaskInstance> symbols = new HashMap<Integer, ITaskInstance>();
+        private Map<Integer, ITask> symbols = new HashMap<Integer, ITask>();
 
         /**
@@ -1596,5 +1642,5 @@
          * trie calculated the count correctly and if it did not create too many nodes.
          */
-        public TaskInstanceTrieTester(int noOfSymbols, int sequenceLength, int maxOrder) {
+        public TaskTrieTester(int noOfSymbols, int sequenceLength, int maxOrder) {
             if (noOfSymbols > 1024) {
                 throw new IllegalArgumentException("too large number of symbols");
@@ -1616,5 +1662,5 @@
             
             for (int i = 0; i < dummySession.size(); i++) {
-                this.symbols.put(i, dummySession.get(i));
+                this.symbols.put(i, dummySession.get(i).getTask());
             }
             
@@ -1675,11 +1721,11 @@
          */
         @Override
-        public TrieProcessor.Result process(List<ITaskInstance> sequence, int count) {
+        public TrieProcessor.Result process(List<ITask> sequence, int count) {
             long key = 0;
             
-            for (ITaskInstance symbol : sequence) {
+            for (ITask symbol : sequence) {
                 int symbolIndex = -1;
                 
-                for (Map.Entry<Integer, ITaskInstance> entry : symbols.entrySet()) {
+                for (Map.Entry<Integer, ITask> entry : symbols.entrySet()) {
                     if (strategy.getTaskComparator().equals(entry.getValue(), symbol)) {
                         symbolIndex = entry.getKey();
