- system-set classes start at 128
- positions debug
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/AbstractSyntaxTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/AbstractSyntaxTree.java
index 0a348fa..7510710 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/AbstractSyntaxTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/AbstractSyntaxTree.java
@@ -147,49 +147,48 @@
 		return group;
 	}
 	
-	protected LinkedHashMap<String, Object> makePosition(String[] allowedFrames, String[] sharedClasses) {
+	protected LinkedHashMap<String, Object> makePosition(String[] allowedFrames, String[] classRefCheck) {
 		LinkedHashMap<String, Object> group = new LinkedHashMap<String, Object>();
 		group.put("@type", "korap:group");
 		group.put("operation", "operation:position");
 		group.put("frames", Arrays.asList(allowedFrames));
-//		group.put("sharedClasses", Arrays.asList(sharedClasses));
 		group.put("operands", new ArrayList<Object>());
 		// DEPRECATED 'frame'
-		if (sharedClasses.length==0) sharedClasses = new String[]{"classRefCheck:includes"};
+		if (classRefCheck.length==0) classRefCheck = new String[]{"classRefCheck:includes"};
 		String frame = "";
 		
-		if (allowedFrames.length==0 && sharedClasses[0]=="classRefCheck:includes") {
+		if (allowedFrames.length==0 && classRefCheck[0]=="classRefCheck:includes") {
 			frame = "frame:contains";
-		} else if (allowedFrames.length==0 && sharedClasses[0]=="classRefCheck:intersects") {
+		} else if (allowedFrames.length==0 && classRefCheck[0]=="classRefCheck:intersects") {
 			frame = "frame:overlaps";
-		} else if (allowedFrames[0]=="frames:startswith" && sharedClasses[0]=="classRefCheck:includes") {
+		} else if (allowedFrames[0]=="frames:startswith" && classRefCheck[0]=="classRefCheck:includes") {
 			frame = "frame:startswith";
-		} else if (allowedFrames[0]=="frames:endswith" && sharedClasses[0]=="classRefCheck:includes") {
+		} else if (allowedFrames[0]=="frames:endswith" && classRefCheck[0]=="classRefCheck:includes") {
 			frame = "frame:endswith";
-		} else if (allowedFrames[0]=="frames:matches" && sharedClasses[0]=="classRefCheck:includes" && sharedClasses.length==1) {
-			frame = "frame:endswith";
-		} else if (allowedFrames[0]=="frames:matches" && sharedClasses[0]=="classRefCheck:includes" && sharedClasses[1]=="classRefCheck:unequals") {
+		} else if (allowedFrames[0]=="frames:matches" && classRefCheck[0]=="classRefCheck:includes" && classRefCheck.length==1) {
 			frame = "frame:matches";
-		} else if (allowedFrames[0]=="frames:matches" && sharedClasses[0]=="classRefCheck:equals") {
+		} else if (allowedFrames[0]=="frames:matches" && classRefCheck[0]=="classRefCheck:includes" && classRefCheck[1]=="classRefCheck:unequals") {
+			frame = "frame:matches";
+		} else if (allowedFrames[0]=="frames:matches" && classRefCheck[0]=="classRefCheck:equals") {
 			frame = "frame:matches";			
-		} else if (allowedFrames[0]=="frames:contains" && sharedClasses[0]=="classRefCheck:includes") {
+		} else if (allowedFrames[0]=="frames:contains" && classRefCheck[0]=="classRefCheck:includes") {
 			frame = "frame:contains";
-		} else if (allowedFrames[0]=="frames:startswith" && sharedClasses[0]=="classRefCheck:intersects") {
+		} else if (allowedFrames[0]=="frames:startswith" && classRefCheck[0]=="classRefCheck:intersects") {
 			frame = "frame:overlapsLeft";
-		} else if (allowedFrames[0]=="frames:endswith" && sharedClasses[0]=="classRefCheck:intersects") {
+		} else if (allowedFrames[0]=="frames:endswith" && classRefCheck[0]=="classRefCheck:intersects") {
 			frame = "frame:overlapsRight";
-		} else if (allowedFrames[0]=="frames:matches" && sharedClasses[0]=="classRefCheck:intersects") {
+		} else if (allowedFrames[0]=="frames:matches" && classRefCheck[0]=="classRefCheck:intersects") {
 			frame = "frame:matches";
-		} else if (allowedFrames[0]=="frames:matches" && sharedClasses[0]=="classRefCheck:unequals") {
+		} else if (allowedFrames[0]=="frames:matches" && classRefCheck[0]=="classRefCheck:unequals") {
 			frame = "frame:matches";
-		} else if (allowedFrames[0]=="frames:matches" && sharedClasses[0]=="classRefCheck:equals") {
+		} else if (allowedFrames[0]=="frames:matches" && classRefCheck[0]=="classRefCheck:equals") {
 			frame = "frame:matches";
-		} else if (allowedFrames[0]=="frames:contains" && sharedClasses[0]=="classRefCheck:intersects") {
+		} else if (allowedFrames[0]=="frames:contains" && classRefCheck[0]=="classRefCheck:intersects") {
 			frame = "frame:contains";
 		}
 		group.put("frame", frame);
 		announcements.add("Deprecated 2014-09-22: 'frame' only to be supported until 3 months from deprecation date. " +
-				"Position frames are now expressed through 'frames' and 'sharedClasses'.");
+				"Position frames are now expressed through 'frames'.");
 		return group;
 	}
 	
@@ -202,10 +201,10 @@
 		group.put("@type", "korap:group");
 		group.put("operation", "operation:class");
 		if (setBySystem) {
-			group.put("class", 1024+classCount);
-			group.put("classOut", 1024+classCount);
+			group.put("class", 128+classCount);
+			group.put("classOut", 128+classCount);
 			announcements.add("A class has been introduced into the backend representation of " +
-					"your query for later reference to a part of the query. The class id is "+(1024+classCount));
+					"your query for later reference to a part of the query. The class id is "+(128+classCount));
 		} else {
 			group.put("class", classCount);
 			group.put("classOut", classCount);
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/AqlTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/AqlTree.java
index 747b52f..ad2d5b7 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/AqlTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/AqlTree.java
@@ -520,36 +520,31 @@
 //			relation.put("groupType", "position");
 			String reltype = operatorNode.getChild(0).toStringTree(parser);
 			String[] frames = new String[]{};
-			String[] sharedClasses = new String[]{"sharedClasses:includes"};
 			switch (reltype) {
 			case "_=_":
-				frames = new String[]{"frame:matches"}; 
-				sharedClasses = new String[]{"sharedClasses:equals"};
+				frames = new String[]{"frames:matches"}; 
 				break;
 			case "_l_":
-				frames = new String[]{"frame:startswith"};
+				frames = new String[]{"frames:startswith"};
 				break;
 			case "_r_":
-				frames = new String[]{"frame:endswith"};
+				frames = new String[]{"frames:endswith"};
 				break;
 			case "_i_":
-				frames = new String[]{"frame:contains"};break;
+				frames = new String[]{"frames:contains"};break;
 			case "_o_":
-				frames = new String[]{"frame:overlapsLeft", "frame:overlapsRight"};
-				sharedClasses = new String[]{"sharedClasses:intersects"};
+				frames = new String[]{"frames:overlapsLeft", "frames:overlapsRight"};
 				break;
 			case "_ol_":
-				frames = new String[]{"frame:overlapsLeft"};
-				sharedClasses = new String[]{"sharedClasses:intersects"};
+				frames = new String[]{"frames:overlapsLeft"};
 				break;
 			case "_or_":
-				frames = new String[]{"frame:overlapsRight"};
-				sharedClasses = new String[]{"sharedClasses:intersects"};
+				frames = new String[]{"frames:overlapsRight"};
 				break;
 			}
 //			relation.put("frames", frames);
 //			relation.put("sharedClasses", sharedClasses);
-			relation = makePosition(frames, sharedClasses);
+			relation = makePosition(frames, new String[]{});
 			relation.put("groupType", "position");
 		}
 		else if (operator.equals("identity")) {
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
index f8a7f19..78cf472 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/CosmasTree.java
@@ -225,6 +225,7 @@
 			LinkedHashMap<String, Object> token = new LinkedHashMap<String, Object>();
 			token.put("@type", "korap:token");
 			ArrayList<Object> terms = new ArrayList<Object>();
+			LinkedHashMap<String, Object> fieldMap = null;
 			for (String morphterm : morphterms) {
 				String[] attrval = morphterm.split("=");
 				if (attrval[0].endsWith("!")) {
@@ -232,7 +233,7 @@
 					attrval[0] = attrval[0].replace("!", "");
 				}
 				String[] foundrylayer = attrval[0].split("/");
-				LinkedHashMap<String, Object> fieldMap = new LinkedHashMap<String, Object>();
+				fieldMap = new LinkedHashMap<String, Object>();
 				fieldMap.put("@type", "korap:term");
 				//     			fieldMap.put("key", "morph:"+node.getChild(0).toString().replace(" ", "_"));
 				fieldMap.put("key", attrval[1]);
@@ -253,7 +254,7 @@
 				terms.add(fieldMap);
 			}
 			if (morphterms.length == 1) {
-				token.put("wrap", terms);
+				token.put("wrap", fieldMap);
 			} else {
 				LinkedHashMap<String, Object> termGroup = makeTermGroup("and");
 				termGroup.put("operands", terms);
@@ -450,7 +451,7 @@
 			if (! (openNodeCats.get(1).equals("OPBEG") || openNodeCats.get(1).equals("OPEND") || inOPALL || openNodeCats.get(1).equals("OPNHIT"))) {
 				wrapOperandInClass(node,1,classCounter);
 				wrapOperandInClass(node,2,classCounter);
-				group = wrapInReference(group, 1024+classCounter++);
+				group = wrapInReference(group, 128+classCounter++);
 			} else if (openNodeCats.get(1).equals("OPNHIT")) {
 				LinkedHashMap<String,Object> repetition = makeRepetition(min, max);
 				((ArrayList<Object>) repetition.get("operands")).add(makeToken());
@@ -519,15 +520,15 @@
 			stackedObjects++;
 			// Step II: wrap in reference and decide where to put
 			ArrayList<String> check = (ArrayList<String>) positionOptions.get("classRefCheck");
-			Integer[] classIn = new Integer[]{1024+classCounter-2,1024+classCounter-1};
-			LinkedHashMap<String, Object> classRefCheck = makeClassRefCheck(check, classIn, 1024+classCounter);
+			Integer[] classIn = new Integer[]{128+classCounter-2,128+classCounter-1};
+			LinkedHashMap<String, Object> classRefCheck = makeClassRefCheck(check, classIn, 128+classCounter);
 			((ArrayList<Object>) classRefCheck.get("operands")).add(posgroup);
 			LinkedHashMap<String, Object> focusGroup = null;
 			if ((boolean) positionOptions.get("matchall") == true) {
 				focusGroup = makeResetReference();
 				((ArrayList<Object>) focusGroup.get("operands")).add(classRefCheck);
 			} else { // match only first argument
-				focusGroup = wrapInReference(classRefCheck, 1024+classCounter-1);
+				focusGroup = wrapInReference(classRefCheck, 128+classCounter-1);
 			}
 			putIntoSuperObject(focusGroup, 1);
 		}
@@ -556,10 +557,10 @@
 		}
 
 		if (nodeCat.equals("OPNHIT")) {
-			Integer[] classRef = new Integer[]{1024+classCounter+1, 1024+classCounter+2}; 
+			Integer[] classRef = new Integer[]{128+classCounter+1, 128+classCounter+2}; 
 			//            classRef.add(classCounter + 1);  // yes, do this twice (two classes)!
-			LinkedHashMap<String, Object> group = makeReference(1024+classCounter);
-			LinkedHashMap<String, Object> classRefCheck = makeClassRefOp("classRefOp:inversion", classRef, classCounter+1024);
+			LinkedHashMap<String, Object> group = makeReference(128+classCounter);
+			LinkedHashMap<String, Object> classRefCheck = makeClassRefOp("classRefOp:inversion", classRef, classCounter+128);
 			ArrayList<Object> operands = new ArrayList<Object>();
 			operands.add(classRefCheck);
 			group.put("operands", operands);
@@ -601,7 +602,7 @@
 			// create a containing group expressing the submatch constraint on the first argument
 			ArrayList<Integer> spanRef = new ArrayList<Integer>();
 			spanRef.add(1);
-			LinkedHashMap<String, Object> submatchgroup = makeReference(1024+classCounter);
+			LinkedHashMap<String, Object> submatchgroup = makeReference(128+classCounter);
 			ArrayList<Object> submatchoperands = new ArrayList<Object>();
 			submatchgroup.put("operands", submatchoperands);
 			putIntoSuperObject(submatchgroup);
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java
index bb78e03..5418c09 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpPlusTree.java
@@ -20,7 +20,7 @@
 public class PoliqarpPlusTree extends Antlr4AbstractSyntaxTree {
 
 	private static Logger log = LoggerFactory.getLogger(PoliqarpPlusTree.class);
-	private int classCounter = 1024;
+	private int classCounter = 128;
 
 	/**
 	 * Most centrally, this class maintains a set of nested maps and lists which represent the JSON tree, which is built by the JSON serialiser
diff --git a/src/test/java/AqlTreeTest.java b/src/test/java/AqlTreeTest.java
index d10b07c..9e0aa59 100644
--- a/src/test/java/AqlTreeTest.java
+++ b/src/test/java/AqlTreeTest.java
@@ -194,7 +194,7 @@
 						"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 							"{@type=korap:group, operation=operation:relation, operands=[" +
 								"{@type=korap:span, layer=cat, key=CP, match=match:eq}," +
-								"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 									"{@type=korap:span, layer=cat, key=VP, match=match:eq}" +
 								"]}" +
 							"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
@@ -214,12 +214,12 @@
 								"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 									"{@type=korap:group, operation=operation:relation, operands=[" +
 										"{@type=korap:span, layer=cat, key=CP, match=match:eq}," +
-										"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+										"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 											"{@type=korap:span, layer=cat, key=VP, match=match:eq}" +
 										"]}" +
 									"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
 								"]}" +
 							"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
@@ -308,7 +308,7 @@
 						"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 							"{@type=korap:group, operation=operation:sequence, operands=[" +
 								"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Sonne, match=match:eq}}," +
-								"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Mond, match=match:eq}}" +
 								"]}" +
 							"], distances=[" +
@@ -330,7 +330,7 @@
 						"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 							"{@type=korap:group, operation=operation:sequence, operands=[" +
 								"{@type=korap:span}," +
-								"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 									"{@type=korap:span}" +
 								"]} "+
 							"], inOrder=true}" +
@@ -352,14 +352,14 @@
 							"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 								"{@type=korap:group, operation=operation:sequence, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Sonne, match=match:eq}}," +
-									"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+									"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 										"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Mond, match=match:eq}}" +
 									"]}" +
 								"], distances=[" +
 									"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=0, max=2}, min=0, max=2}" +
 								"], inOrder=true}" +
 							"]}," +	
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 								"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Sterne, match=match:eq}}" +
 							"]}" +
 						"],distances=[" +
@@ -381,7 +381,7 @@
 							"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 									"{@type=korap:group, operation=operation:relation, operands=[" +
 										"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Sonne, match=match:eq}}," +
-										"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+										"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 											"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Mond, match=match:eq}}" +
 										"]}" +
 									"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
@@ -401,7 +401,7 @@
 							"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 									"{@type=korap:group, operation=operation:relation, operands=[" +
 										"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Sonne, match=match:eq}}," +
-										"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+										"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 											"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Mond, match=match:eq}}" +
 										"]}" +
 									"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
@@ -422,13 +422,13 @@
 						"{@type=korap:group, operation=operation:relation, operands=[" +
 							"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 								"{@type=korap:group, operation=operation:relation, operands=[" +
-									"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+									"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 										"{@type=korap:span}" +
 									"]}," +
 									"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
 								"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
 							"]}," +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 								"{@type=korap:span, layer=cat, key=VP, match=match:eq}" +
 							"]}" +
 						"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}" +
@@ -449,10 +449,10 @@
 		String eq2 =
 				"{@type=korap:group, operation=operation:position, frames=[frame:startswith], sharedClasses=[sharedClasses:includes], operands=[" +
 						"{@type=korap:group, operation=operation:relation, operands=[" +
-							"{@type=korap:group, operation=operation:class, class=, classOut=1025, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=, classOut=129, operands=[" +
 								"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
 							"]}," +
-							"{@type=korap:group, operation=operation:class, class=, classOut=1025, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=, classOut=129, operands=[" +
 								"{@type=korap:span, layer=cat, key=VP, match=match:eq}" +
 							"]}" +
 						"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}," +
@@ -468,7 +468,7 @@
 	public void testPositions() throws QueryException {
 		query = "node & node & #2 _=_ #1";
 		String pos1 = 
-				"{@type=korap:group, operation=operation:position, frames=[frame:matches], sharedClasses=[sharedClasses:equals], operands=[" +
+				"{@type=korap:group, operation=operation:position, frames=[frames:matches], operands=[" +
 						"{@type=korap:span}," +
 						"{@type=korap:span}" +
 				"], frame=frame:matches}";
@@ -478,7 +478,7 @@
 		
 		query = "node & node & #2 _i_ #1";
 		String pos2 = 
-				"{@type=korap:group, operation=operation:position, frames=[frame:contains], sharedClasses=[sharedClasses:includes], operands=[" +
+				"{@type=korap:group, operation=operation:position, frames=[frames:contains], operands=[" +
 						"{@type=korap:span}," +
 						"{@type=korap:span}" +
 				"], frame=frame:contains" +
@@ -489,7 +489,7 @@
 		
 		query = "node & node & #2 _l_ #1";
 		String pos3 = 
-				"{@type=korap:group, operation=operation:position, frames=[frame:startswith], sharedClasses=[sharedClasses:includes], operands=[" +
+				"{@type=korap:group, operation=operation:position, frames=[frames:startswith], operands=[" +
 						"{@type=korap:span}," +
 						"{@type=korap:span}" +
 				"], frame=frame:startswith" +
@@ -500,7 +500,7 @@
 		
 		query = "node & \"Mann\" & #1 _r_ #2";
 		String pos4 = 
-					"{@type=korap:group, operation=operation:position, frames=[frame:endswith], sharedClasses=[sharedClasses:includes], operands=[" +
+					"{@type=korap:group, operation=operation:position, frames=[frames:endswith], operands=[" +
 						"{@type=korap:span}," +
 						"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Mann, match=match:eq}}" +
 						"], frame=frame:endswith" +
@@ -511,7 +511,7 @@
 		
 		query = "node & \"Mann\" & #2 _r_ #1";
 		String pos5 = 
-					"{@type=korap:group, operation=operation:position, frames=[frame:endswith], sharedClasses=[sharedClasses:includes], operands=[" +
+					"{@type=korap:group, operation=operation:position, frames=[frames:endswith], operands=[" +
 						"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Mann, match=match:eq}}," +
 						"{@type=korap:span}" +
 						"], frame=frame:endswith" +
@@ -530,7 +530,7 @@
 			"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 				"{@type=korap:group, operation=operation:sequence, operands=[" +
 					"{@type=korap:token, wrap={@type=korap:term, layer=pos, key=N, match=match:eq}}," +
-					"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+					"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 						"{@type=korap:token, wrap={@type=korap:term, layer=pos, key=V, match=match:eq}}" +
 					"]}" +
 				"], inOrder=true}" +
@@ -548,7 +548,7 @@
 			"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 				"{@type=korap:group, operation=operation:sequence, operands=[" +
 					"{@type=korap:token, wrap={@type=korap:term, layer=pos, key=N, match=match:eq}}," +
-					"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+					"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 						"{@type=korap:token, wrap={@type=korap:term, layer=pos, key=V, match=match:eq}}" +
 					"]}" +
 				"], inOrder=true}" +
@@ -564,7 +564,7 @@
 			"{@type=korap:group, operation=operation:relation, operands=[" +
 				"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 					"{@type=korap:group, operation=operation:relation, operands=[" +
-						"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+						"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 							"{@type=korap:token, wrap={@type=korap:term, layer=pos, key=N, match=match:eq}}" +
 						"]}," +
 						"{@type=korap:token, wrap={@type=korap:term, layer=pos, key=V, match=match:eq}}" +
@@ -585,16 +585,16 @@
 							// dominance relation #1 > #2 is reduced to #1, for expressing #1 > #3
 							"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 								"{@type=korap:group, operation=operation:relation, operands=[" +
-									"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+									"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 										"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
 									"]}," +
-									"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+									"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 										"{@type=korap:token, wrap={@type=korap:term, layer=pos, key=V, match=match:eq}}" +
 									"]}" +
 								"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
 							"]}," +
 							// establish class 2 around P for later reference
-							"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 								"{@type=korap:token, wrap={@type=korap:term, layer=pos, key=P, match=match:eq}}" +
 							"]}" +
 						"], relation={@type=korap:relation, wrap={@type=korap:term, layer=c}}}" +
@@ -649,7 +649,7 @@
 				"{@type=korap:group, operation=operation:relation, operands=[" +
 						"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 							"{@type=korap:group, operation=operation:relation, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 									"{@type=korap:span}" +
 								"]}," +
 								"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
@@ -669,7 +669,7 @@
 						"{@type=korap:group, operation=operation:relation, operands=[" +
 							"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 								"{@type=korap:group, operation=operation:relation, operands=[" +
-									"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+									"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 										"{@type=korap:span}" +
 									"]}," +
 									"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
@@ -695,7 +695,7 @@
 								"{@type=korap:group, operation=operation:relation, operands=[" +
 									"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 										"{@type=korap:group, operation=operation:relation, operands=[" +
-											"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+											"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 												"{@type=korap:span}" +
 											"]}," +
 											"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
@@ -720,7 +720,7 @@
 				"{@type=korap:group, operation=operation:relation, operands=[" +
 						"{@type=korap:reference, operation=operation:focus, classRef=[0], operands=[" +
 							"{@type=korap:group, operation=operation:relation, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1024, classOut=1024, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=128, classOut=128, operands=[" +
 									"{@type=korap:span}" +
 								"]}," +
 								"{@type=korap:span, layer=cat, key=NP, match=match:eq}" +
diff --git a/src/test/java/CosmasTreeTest.java b/src/test/java/CosmasTreeTest.java
index 2f8fe07..b664c51 100644
--- a/src/test/java/CosmasTreeTest.java
+++ b/src/test/java/CosmasTreeTest.java
@@ -76,7 +76,7 @@
 	
 	@Test
 	public void testMORPH() throws QueryException {
-		query="#MORPH(V)";
+		query="#MORPH(pos=V)";
 		String morph1 = 
 					"{@type=korap:token, wrap={@type=korap:term, key=V, layer=pos, match=match:eq}}";
 		ct = new CosmasTree(query);
@@ -220,13 +220,13 @@
 	public void testOPPROX() throws QueryException {
 		query="Sonne /+w1:4 Mond";
 		String prox1 = 
-					"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+					"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 						"{@type=korap:group, operation=operation:sequence, " +
 							"operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
 									"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 								"]}" +
 							"], inOrder=true, " +
@@ -241,13 +241,13 @@
 		
 		query="Sonne /+w1:4,s0,p1:3 Mond";
 		String prox2 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 					"{@type=korap:group, operation=operation:sequence, " +
 						"operands=[" +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
 								"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 							"]}," +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
 								"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 							"]}" +
 						"], inOrder=true, " +
@@ -264,13 +264,13 @@
 		
 		query="Sonne %+w1:4,s0,p1:3 Mond";
 		String prox3 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 					"{@type=korap:group, operation=operation:sequence, " +
 						"operands=[" +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
 								"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 							"]}," +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
 								"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 							"]}" +
 						"], inOrder=true, " +
@@ -287,13 +287,13 @@
 		
 		query="Sonne /+w4 Mond";
 		String prox4 = 
-						"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+						"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 							"{@type=korap:group, operation=operation:sequence, " +
 								"operands=[" +
-									"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
+									"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
 										"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 									"]}," +
-									"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
+									"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
 										"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 									"]}" +
 								"], inOrder=true, " +
@@ -304,20 +304,20 @@
 						"]}";
 //					"{@type=korap:group, operation=operation:or, operands=[" +
 //						"{@type=korap:group, operation=operation:position, frames=[frames:], sharedClasses=[sharedClasses:intersects], operands=[" +
-//							"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//							"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //								"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 //							"]}," +
-//							"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//							"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //								"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 //							"]}" +
 //						"], frame=frame:overlaps}," +
-//						"{@type=korap:reference, operation=operation:focus, classRef=[1024], operands=[" +
+//						"{@type=korap:reference, operation=operation:focus, classRef=[128], operands=[" +
 //							"{@type=korap:group, operation=operation:sequence, " +
 //								"operands=[" +
-//									"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//									"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //										"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 //									"]}," +
-//									"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//									"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //										"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 //									"]}" +
 //								"], inOrder=true, " +
@@ -335,13 +335,13 @@
 		
 		query="Sonne /-w4 Mond";
 		String prox5 = 
-					"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+					"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 						"{@type=korap:group, operation=operation:sequence, " +
 							"operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
 									"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
 									"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 								"]}" +
 							"], inOrder=true, " +
@@ -352,20 +352,20 @@
 					"]}";
 //				"{@type=korap:group, operation=operation:or, operands=[" +
 //					"{@type=korap:group, operation=operation:position, frames=[frames:], sharedClasses=[sharedClasses:intersects], operands=[" +
-//						"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//						"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //							"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 //						"]}," +
-//						"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//						"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //							"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 //						"]}" +
 //					"], frame=frame:overlaps}," +
-//					"{@type=korap:reference, operation=operation:focus, classRef=[1024], operands=[" +
+//					"{@type=korap:reference, operation=operation:focus, classRef=[128], operands=[" +
 //						"{@type=korap:group, operation=operation:sequence, " +
 //							"operands=[" +
-//								"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//								"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //									"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 //								"]}," +
-//								"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//								"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //									"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 //								"]}" +
 //							"], inOrder=true, " +
@@ -381,13 +381,13 @@
 		
 		query="Sonne /w4 Mond";
 		String prox6 = 
-					"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+					"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 						"{@type=korap:group, operation=operation:sequence, " +
 							"operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
 									"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
 									"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 								"]}" +
 							"], inOrder=false, " +
@@ -398,20 +398,20 @@
 					"]}";
 //				"{@type=korap:group, operation=operation:or, operands=[" +
 //					"{@type=korap:group, operation=operation:position, frames=[frames:], sharedClasses=[sharedClasses:intersects], operands=[" +
-//						"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//						"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //							"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 //						"]}," +
-//						"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//						"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //							"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 //						"]}" +
 //					"], frame=frame:overlaps}," +
-//					"{@type=korap:reference, operation=operation:focus, classRef=[1024], operands=[" +
+//					"{@type=korap:reference, operation=operation:focus, classRef=[128], operands=[" +
 //						"{@type=korap:group, operation=operation:sequence, " +
 //							"operands=[" +
-//								"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//								"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //									"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 //								"]}," +
-//								"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//								"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //									"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 //								"]}" +
 //							"], inOrder=false, " +
@@ -430,20 +430,20 @@
 	public void testOPPROXNested() throws QueryException {	
 		query="Sonne /+w1:4 Mond /-w1:7 Sterne";
 		expected = 
-					"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+					"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 						"{@type=korap:group, operation=operation:sequence, " +
 							"operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
-									"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
+									"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
 										"{@type=korap:group, operation=operation:sequence, " +
 											"operands=[" +
-												"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+												"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 													"{@type=korap:token, wrap={@type=korap:term, key=Sterne, layer=orth, match=match:eq}}" +
 												"]}," +
-												"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +	
+												"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +	
 													"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 												"]}" +
 											"], inOrder=true, " +
@@ -471,10 +471,10 @@
 //					"{@type=korap:token, wrap={@type=korap:term, key=Sterne, layer=orth, match=match:eq}}" ;
 		
 		String mondsterneClasses = 
-					"{@type=korap:group, operation=operation:class, class=1024 , classOut=1024, operands=[" +	
+					"{@type=korap:group, operation=operation:class, class=128 , classOut=128, operands=[" +	
 						"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 					"]}," +
-					"{@type=korap:group, operation=operation:class, class=1024 , classOut=1024, operands=[" +	
+					"{@type=korap:group, operation=operation:class, class=128 , classOut=128, operands=[" +	
 						"{@type=korap:token, wrap={@type=korap:term, key=Sterne, layer=orth, match=match:eq}}" +
 					"]}";
 //		String mondsterneSeq = 
@@ -484,7 +484,7 @@
 //						"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1, max=2}, min=1, max=2}" +
 //					"]}" ;
 		String mondsterneClassesSeq = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1024], operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[128], operands=[" +
 					"{@type=korap:group, operation=operation:sequence, operands=[" +
 						mondsterneClasses +
 					"], inOrder=true, distances=[" +
@@ -510,17 +510,17 @@
 		
 		
 		String prox6 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 						"{@type=korap:group, operation=operation:sequence, " +
 							"operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +	
-									"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +	
+									"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
 										"{@type=korap:group, operation=operation:sequence, " +
 											"operands=[" +
-												"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+												"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 													"{@type=korap:token, wrap={@type=korap:term, key=Mond, layer=orth, match=match:eq}}" +
 												"]}," +
-												"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +	
+												"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +	
 													"{@type=korap:token, wrap={@type=korap:term, key=Sterne, layer=orth, match=match:eq}}" +
 												"]}" +
 											"], inOrder=true, " +
@@ -530,7 +530,7 @@
 										"}" +
 									"]}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 								"]}" +
 							"], inOrder=true, " +
@@ -542,20 +542,20 @@
 					""	;
 //			"{@type=korap:group, operation=operation:or, operands=[" +
 //				"{@type=korap:group, operation=operation:position, frames=[frames:], sharedClasses=[sharedClasses:intersects], operands=[" +
-//					"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//					"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //						mondsterneAllClasses  + 
 //					"]}," +
-//					"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//					"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //						"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 //					"]}" +
 //				"], frame=frame:overlaps}," +
-//				"{@type=korap:reference, operation=operation:focus, classRef=[1024], operands=[" +
+//				"{@type=korap:reference, operation=operation:focus, classRef=[128], operands=[" +
 //					"{@type=korap:group, operation=operation:sequence, " +
 //						"operands=[" +
-//							"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +	
+//							"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +	
 //								mondsterneAllClasses  + 
 //							"]}," +
-//							"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+//							"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //								"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
 //							"]}" +
 //						"], inOrder=true, " +
@@ -574,13 +574,13 @@
 	public void testOPIN() throws QueryException {
 		query="wegen #IN <s>";
 		String opin1 = 
-					"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
-						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:includes, classIn=[1025,1026], classOut=1027, operands=[" +
+					"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
+						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:includes, classIn=[129,130], classOut=131, operands=[" +
 							"{@type=korap:group, operation=operation:position, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 								"]}" +
 							"], frames=[], frame=frame:contains}" +
@@ -592,13 +592,13 @@
 		
 		query="wegen #IN(L) <s>"; 
 		String opin2 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
-						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:includes, classIn=[1025,1026], classOut=1027, operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
+						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:includes, classIn=[129,130], classOut=131, operands=[" +
 							"{@type=korap:group, operation=operation:position, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 								"]}" +
 						"], frames=[frames:startswith], frame=frame:startswith}" +
@@ -611,13 +611,13 @@
 		
 		query="wegen #IN(F) <s>";
 		String opin3= 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
-						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:includes, classIn=[1025,1026], classOut=1027, operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
+						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:includes, classIn=[129,130], classOut=131, operands=[" +
 							"{@type=korap:group, operation=operation:position, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 								"]}" +
 						"], frames=[frames:matches], frame=frame:matches}" +
@@ -629,13 +629,13 @@
 		
 		query="wegen #IN(FI) <s>";
 		String opin4= 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
-						"{@type=korap:group, operation=operation:class, classRefCheck=[classRefCheck:unequals,classRefCheck:includes], classIn=[1025,1026], classOut=1027, operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
+						"{@type=korap:group, operation=operation:class, classRefCheck=[classRefCheck:unequals,classRefCheck:includes], classIn=[129,130], classOut=131, operands=[" +
 							"{@type=korap:group, operation=operation:position, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 								"]}" +
 						"], frames=[frames:matches], frame=frame:matches-noident}" +
@@ -647,13 +647,13 @@
 		
 		query="wegen #IN(FE) <s>";
 		String opin5= 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
-						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:equals, classIn=[1025,1026], classOut=1027, operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
+						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:equals, classIn=[129,130], classOut=131, operands=[" +
 							"{@type=korap:group, operation=operation:position, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 								"]}" +
 						"], frames=[frames:matches], frame=frame:matches}" +
@@ -665,13 +665,13 @@
 		
 		query="wegen #IN(%, L) <s>";
 		String opin6 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
-						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:includes, classIn=[1025,1026], classOut=1027, operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
+						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:includes, classIn=[129,130], classOut=131, operands=[" +
 							"{@type=korap:group, operation=operation:position, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 								"]}" +
 						"], frames=[frames:startswith], frame=frame:startswith, exclude=true}" +
@@ -684,12 +684,12 @@
 		query="wegen #IN('FE,ALL,%,MIN') <s>";
 		String opin7 = 
 				"{@type=korap:reference, operation=operation:focus, reset=true, operands=[" +	
-					"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:equals, classIn=[1025,1026], classOut=1027, operands=[" +
+					"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:equals, classIn=[129,130], classOut=131, operands=[" +
 						"{@type=korap:group, operation=operation:position, operands=[" +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 								"{@type=korap:span, key=s}" +
 							"]}," +
-							"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 								"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 							"]}" +
 				
@@ -706,13 +706,13 @@
 	public void testOPOV() throws QueryException {
 		query="wegen #OV <s>";
 		String opov1 = 
-					"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
-						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:intersects, classIn=[1025,1026], classOut=1027, operands=[" +
+					"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
+						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:intersects, classIn=[129,130], classOut=131, operands=[" +
 							"{@type=korap:group, operation=operation:position, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 								"]}" +
 							"], frames=[], frame=frame:overlaps}" +
@@ -724,13 +724,13 @@
 		
 		query="wegen #OV(L) <s>";
 		String opov2 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
-						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:intersects, classIn=[1025,1026], classOut=1027, operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
+						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:intersects, classIn=[129,130], classOut=131, operands=[" +
 							"{@type=korap:group, operation=operation:position, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 								"]}" +
 							"], frames=[frames:startswith,frames:overlapsLeft], frame=frame:overlapsLeft}" +
@@ -743,13 +743,13 @@
 		query="wegen #OV(F) <s>";
 		String opov3= 
 				
-					"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
-						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:intersects, classIn=[1025,1026], classOut=1027, operands=[" +
+					"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
+						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:intersects, classIn=[129,130], classOut=131, operands=[" +
 							"{@type=korap:group, operation=operation:position, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 								"]}" +
 							"], frames=[frames:matches], frame=frame:matches}" +
@@ -761,13 +761,13 @@
 		
 		query="wegen #OV(FI) <s>";
 		String opov4= 
-					"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
-						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:unequals, classIn=[1025,1026], classOut=1027, operands=[" +
+					"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
+						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:unequals, classIn=[129,130], classOut=131, operands=[" +
 							"{@type=korap:group, operation=operation:position, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 								"]}" +
 							"], frames=[frames:matches], frame=frame:matches-noident}" +
@@ -779,13 +779,13 @@
 		
 		query="wegen #OV(FE) <s>";
 		String opov5= 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1026], operands=[" +
-						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:equals, classIn=[1025,1026], classOut=1027, operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[130], operands=[" +
+						"{@type=korap:group, operation=operation:class, classRefCheck=classRefCheck:equals, classIn=[129,130], classOut=131, operands=[" +
 							"{@type=korap:group, operation=operation:position, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=wegen, layer=orth, match=match:eq}}" +
 								"]}" +
 							"], frames=[frames:matches], frame=frame:matches}" +
@@ -835,10 +835,10 @@
 		
 //		String dermannSeq = "{@type=korap:group, operation=operation:sequence," +
 //								"operands = [" +
-//									"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+//									"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //										"{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}" +
 //									"]}," +
-//									"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+//									"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //										"{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
 //									"]}" +
 //									
@@ -847,7 +847,7 @@
 //								"]}";
 //		
 //		String begDermannSeq = 
-////							"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+////							"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //								"{@type=korap:reference, operation=operation:focus, spanRef=[0,1], operands=[" +
 //									dermannSeq +
 //								"]}" +
@@ -860,19 +860,19 @@
 		String beg2 = 
 //					"{@type=korap:group, operation=operation:or, operands=[" +
 //						"{@type=korap:group, operation=operation:position, frames=[frames:], sharedClasses=[sharedClasses:intersects], operands=[" +
-//							"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+//							"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //								beg1 +
 //							"]}" + "," +
-//							"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+//							"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //								kommt +
 //							"]}" +
 //						"], frame=frame:overlaps}," +
-//						"{@type=korap:reference, operation=operation:focus, classRef=[1024], operands=[" +
+//						"{@type=korap:reference, operation=operation:focus, classRef=[128], operands=[" +
 //							"{@type=korap:group, operation=operation:sequence, operands=[" +
-//								"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+//								"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //									beg1 + 
 //								"]}," +
-//								"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+//								"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //									kommt +
 //								"]}" +
 //							"], inOrder=true, distances=[" +
@@ -881,12 +881,12 @@
 //						"]}" +
 //					"]}";
 //		
-						"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+						"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 							"{@type=korap:group, operation=operation:sequence, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									beg1 + 
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									kommt +
 								"]}" +
 							"], inOrder=true, distances=[" +
@@ -901,20 +901,20 @@
 		String beg3 = 
 //				"{@type=korap:group, operation=operation:or, operands=[" +
 //						"{@type=korap:group, operation=operation:position, frames=[frames:], sharedClasses=[sharedClasses:intersects], operands=[" +
-//							"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+//							"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //								kommt + 
 ////							"," +
 //							"]}," +
-//							"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+//							"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //								beg1+
 //							"]}" +
 //						"], frame=frame:overlaps}," +
-//						"{@type=korap:reference, operation=operation:focus, classRef=[1024], operands=[" +
+//						"{@type=korap:reference, operation=operation:focus, classRef=[128], operands=[" +
 //							"{@type=korap:group, operation=operation:sequence, operands=[" +
-//								"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+//								"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //									kommt +
 //								"]}," +
-//								"{@type=korap:group, operation=operation:class, class= , classOut=1024, operands=[" +
+//								"{@type=korap:group, operation=operation:class, class= , classOut=128, operands=[" +
 //									beg1+
 //								"]}" +
 //							"], inOrder=true, distances=[" +
@@ -923,12 +923,12 @@
 //						"]}" +
 //					"]}";
 				
-						"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+						"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 							"{@type=korap:group, operation=operation:sequence, operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									kommt +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									beg1+
 								"]}" +
 							"], inOrder=true, distances=[" +
@@ -963,9 +963,9 @@
 		query="Sonne /s0 Mond";   // contains(focus(1:contains({1:<s>},Sonne)),Mond)
 		expected = 
 					"{@type=korap:group, operation=operation:position, frame=frame:frame:contains, operands=[" +
-						"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+						"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 							"{@type=korap:group, operation=operation:position, frame=frame:frame:contains, operands=[" +
-								"{@type=korap:group, operation=operation:class, class= , classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class= , classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
 								"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
@@ -980,9 +980,9 @@
 		query="Sonne /s0,w5 Mond";   
 		expected = 
 					"{@type=korap:group, operation=operation:position, frame=frame:frame:contains, operands=[" +
-						"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+						"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 							"{@type=korap:group, operation=operation:position, frame=frame:frame:contains, operands=[" +
-								"{@type=korap:group, operation=operation:class, class= , classOut=1025, operands=[" +
+								"{@type=korap:group, operation=operation:class, class= , classOut=129, operands=[" +
 									"{@type=korap:span, key=s}" +
 								"]}," +
 								"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
@@ -1034,9 +1034,9 @@
 		expected = 
 					"{@type=korap:group, operation=operation:or, operands=[" +
 						"{@type=korap:group, operation=operation:position, frame=frame:frame:contains, operands=[" +
-							"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+							"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 								"{@type=korap:group, operation=operation:position, frame=frame:frame:contains, operands=[" +
-									"{@type=korap:group, operation=operation:class, class= , classOut=1025, operands=[" +
+									"{@type=korap:group, operation=operation:class, class= , classOut=129, operands=[" +
 										"{@type=korap:span, key=s}" +
 									"]}," +
 									"{@type=korap:token, wrap={@type=korap:term, key=Sonne, layer=orth, match=match:eq}}" +
@@ -1176,14 +1176,14 @@
 	public void testOPNHIT() throws QueryException {
 		query="#NHIT(gehen /w1:10 voran)";
 		String nhit1 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
-					"{@type=korap:group, operation=operation:class, classRefOp=classRefOp:inversion, classIn=[1026,1027], classOut=1025, operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
+					"{@type=korap:group, operation=operation:class, classRefOp=classRefOp:inversion, classIn=[130,131], classOut=129, operands=[" +
 						"{@type=korap:group, operation=operation:sequence, " +
 							"operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1026 , classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130 , classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=gehen, layer=orth, match=match:eq}}" +
 								"]}," +	
-								"{@type=korap:group, operation=operation:class, class=1027 , classOut=1027, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=131 , classOut=131, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=voran, layer=orth, match=match:eq}}" +
 								"]}" +	
 							"], inOrder=false, " +
@@ -1199,11 +1199,11 @@
 
 //		query="#NHIT(gehen %w1:10 voran)";
 //		String nhit2 = 
-//				"{@type=korap:reference, operation=operation:focus, classRef=1025, operands=[" +
+//				"{@type=korap:reference, operation=operation:focus, classRef=129, operands=[" +
 //					"{@type=korap:group, operation=operation:sequence, " +
 //						"operands=[" +
 //							"{@type=korap:token, wrap={@type=korap:term, key=gehen, layer=orth, match=match:eq}}" +
-//							"{@type=korap:group, operation=operation:class, class= , classOut=1025, operands=[" +
+//							"{@type=korap:group, operation=operation:class, class= , classOut=129, operands=[" +
 //								"{@type=korap:group, operation=operation:repetition, operands=[" +
 //									"{@type=korap:token}" +
 //								"], boundary={@type=korap:boundary, min=1, max=10}, min=1, max=10}}" +
@@ -1221,21 +1221,21 @@
 		
 		query="#NHIT(gehen /+w1:10 voran /w1:10 Beispiel)";
 		String nhit3 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
-					"{@type=korap:group, operation=operation:class, classRefOp=classRefOp:inversion, classIn=[1026,1027], classOut=1025, operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
+					"{@type=korap:group, operation=operation:class, classRefOp=classRefOp:inversion, classIn=[130,131], classOut=129, operands=[" +
 						"{@type=korap:group, operation=operation:sequence, " +
 							"operands=[" +
-								"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+								"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=gehen, layer=orth, match=match:eq}}" +
 								"]}," +
-								"{@type=korap:group, operation=operation:class, class=1027, classOut=1027, operands=[" +
-									"{@type=korap:reference, operation=operation:focus, classRef=[1028], operands=[" +
+								"{@type=korap:group, operation=operation:class, class=131, classOut=131, operands=[" +
+									"{@type=korap:reference, operation=operation:focus, classRef=[132], operands=[" +
 										"{@type=korap:group, operation=operation:sequence, " +
 											"operands=[" +
-												"{@type=korap:group, operation=operation:class, class=1028, classOut=1028, operands=[" +
+												"{@type=korap:group, operation=operation:class, class=132, classOut=132, operands=[" +
 													"{@type=korap:token, wrap={@type=korap:term, key=voran, layer=orth, match=match:eq}}" +
 												"]}," +
-												"{@type=korap:group, operation=operation:class, class=1028, classOut=1028, operands=[" +	
+												"{@type=korap:group, operation=operation:class, class=132, classOut=132, operands=[" +	
 													"{@type=korap:token, wrap={@type=korap:term, key=Beispiel, layer=orth, match=match:eq}}" +
 												"]}" +
 											"], inOrder=false, " +
@@ -1261,10 +1261,10 @@
 	public void testOPBED() throws QueryException {
 		query = "#BED(der , sa)";
 		String bed1 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands= [" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[129], operands= [" +
 					"{@type=korap:group, operation=operation:position, frames=[frames:startswith], operands=[" +
 						"{@type=korap:span, key=s}," +
-						"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+						"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 							"{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}" +
 						"]}" +
 					"], frame=frame:startswith}" +
@@ -1275,10 +1275,10 @@
 		
 		query = "#BED(der Mann , +pe)";
 		String bed2 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands= [" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[129], operands= [" +
 						"{@type=korap:group, operation=operation:position, frames=[frames:endswith], operands=[" +
 							"{@type=korap:span, key=p}," +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 								"{@type=korap:group, operation=operation:sequence, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
 									"{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
@@ -1292,11 +1292,11 @@
 		
 		query = "#BED(der Mann , sa,-pa)";
 		String bed3 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 					"{@type=korap:group, operation=operation:position, frames=[frames:matches], operands=[" +
 						"{@type=korap:group, operation=operation:position, frames=[frames:startswith], operands=[" +
 							"{@type=korap:span, key=s}," +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 								"{@type=korap:group, operation=operation:sequence, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
 									"{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
@@ -1305,7 +1305,7 @@
 						"], frame=frame:startswith}," +
 						"{@type=korap:group, operation=operation:position, frames=[frames:startswith], operands=[" +
 							"{@type=korap:span, key=p}," +
-							"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 								"{@type=korap:group, operation=operation:sequence, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=der, layer=orth, match=match:eq}}," +
 									"{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
@@ -1324,10 +1324,10 @@
 		
 		query = "Der:sa";
 		String col1 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 					"{@type=korap:group, operation=operation:position, frames=[frames:startswith], operands=[" +
 						"{@type=korap:span, key=s}," +
-						"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+						"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 							"{@type=korap:token, wrap={@type=korap:term, key=Der, layer=orth, match=match:eq}}" +
 						"]}" +
 					"], frame=frame:startswith}" +
@@ -1338,23 +1338,23 @@
 		
 		query = "Mann:sa,-pa,+te)";
 		String col2 = 
-				"{@type=korap:reference, operation=operation:focus, classRef=[1025], operands=[" +
+				"{@type=korap:reference, operation=operation:focus, classRef=[129], operands=[" +
 					"{@type=korap:group, operation=operation:position, frames=[frames:matches], operands=[" +
 						"{@type=korap:group, operation=operation:position, frames=[frames:startswith], operands=[" +
 							"{@type=korap:span, key=s}," +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
 							"]}" +
 						"], frame=frame:startswith}," +
 						"{@type=korap:group, operation=operation:position, frames=[frames:startswith], operands=[" +
 							"{@type=korap:span, key=p}," +
-							"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
 							"]}" +
 						"], frame=frame:startswith, exclude=true}," +
 						"{@type=korap:group, operation=operation:position, frames=[frames:endswith], operands=[" +
 							"{@type=korap:span, key=t}," +
-							"{@type=korap:group, operation=operation:class, class=1027, classOut=1027, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=131, classOut=131, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, key=Mann, layer=orth, match=match:eq}}" +
 							"]}" +
 						"], frame=frame:endswith}" +
diff --git a/src/test/java/PoliqarpPlusTreeTest.java b/src/test/java/PoliqarpPlusTreeTest.java
index 3a79aaa..27e4fca 100644
--- a/src/test/java/PoliqarpPlusTreeTest.java
+++ b/src/test/java/PoliqarpPlusTreeTest.java
@@ -1311,12 +1311,12 @@
 		expected = 
 				"{@type=korap:group, operation=operation:sequence, operands=[" +
 					"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=der, match=match:eq}}," +
-					"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+					"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 						"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Mann, match=match:eq}}" +
 					"]}" +
 				"]}";
 		metaExpected = 
-				"{alignment=1025}";
+				"{alignment=129}";
 		ppt = new PoliqarpPlusTree(query);
 		map = ppt.getRequestMap().get("query").toString();
 		metaMap = ppt.getRequestMap().get("meta").toString();
@@ -1328,7 +1328,7 @@
 		String expected = 
 				"{@type=korap:group, operation=operation:sequence, operands=[" +
 					"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=der, match=match:eq}}," +
-					"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+					"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 						"{@type=korap:group, operation=operation:sequence, operands=[" +
 							"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=große, match=match:eq}}," +
 							"{@type=korap:token, wrap={@type=korap:term, layer=orth, key=Mann, match=match:eq}}" +
@@ -1336,7 +1336,7 @@
 					"]}" +
 				"]}";
 		metaExpected = 
-				"{alignment=1025}";
+				"{alignment=129}";
 		ppt = new PoliqarpPlusTree(query);
 		map = ppt.getRequestMap().get("query").toString();
 		metaMap = ppt.getRequestMap().get("meta").toString();
@@ -1348,14 +1348,14 @@
 				"{@type=korap:group, operation=operation:or, operands=[" +
 						"{@type=korap:group, operation=operation:sequence, operands=[" +
 							"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=a, match=match:eq}}," +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 								"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=b, match=match:eq}}" +
 							"]}" +
 						"]}," +
 						"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=c, match=match:eq}}" +
 				"]}";
 		metaExpected = 
-				"{alignment=1025}";
+				"{alignment=129}";
 		ppt = new PoliqarpPlusTree(query);
 		map = ppt.getRequestMap().get("query").toString();
 		metaMap = ppt.getRequestMap().get("meta").toString();
@@ -1367,7 +1367,7 @@
 				"{@type=korap:group, operation=operation:or, operands=[" +
 						"{@type=korap:group, operation=operation:sequence, operands=[" +
 							"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=a, match=match:eq}}," +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 								"{@type=korap:group, operation=operation:sequence, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=b, match=match:eq}}," +
 									"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=c, match=match:eq}}" +
@@ -1377,7 +1377,7 @@
 						"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=d, match=match:eq}}" +
 				"]}";
 		metaExpected = 
-				"{alignment=1025}";
+				"{alignment=129}";
 		ppt = new PoliqarpPlusTree(query);
 		map = ppt.getRequestMap().get("query").toString();
 		metaMap = ppt.getRequestMap().get("meta").toString();
@@ -1389,10 +1389,10 @@
 				"{@type=korap:group, operation=operation:or, operands=[" +
 						"{@type=korap:group, operation=operation:sequence, operands=[" +
 							"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=a, match=match:eq}}," +
-							"{@type=korap:group, operation=operation:class, class=1025, classOut=1025, operands=[" +
+							"{@type=korap:group, operation=operation:class, class=129, classOut=129, operands=[" +
 								"{@type=korap:group, operation=operation:sequence, operands=[" +
 									"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=b, match=match:eq}}," +
-									"{@type=korap:group, operation=operation:class, class=1026, classOut=1026, operands=[" +
+									"{@type=korap:group, operation=operation:class, class=130, classOut=130, operands=[" +
 										"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=c, match=match:eq}}" +
 									"]}" +
 								"]}" +
@@ -1401,7 +1401,7 @@
 						"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=d, match=match:eq}}" +
 				"]}";
 		metaExpected = 
-				"{alignment=[1025,1026]}";
+				"{alignment=[129,130]}";
 		ppt = new PoliqarpPlusTree(query);
 		map = ppt.getRequestMap().get("query").toString();
 		metaMap = ppt.getRequestMap().get("meta").toString();