diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/JsonGenerator.java b/src/main/java/de/ids_mannheim/korap/query/serialize/JsonGenerator.java
index 829fbdc..9769ca0 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/JsonGenerator.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/JsonGenerator.java
@@ -37,6 +37,8 @@
 //			ast = new CosmasTree(query);
 		} else if (queryLanguage.equals("poliqarpplus")) {
 			ast = new PoliqarpPlusTree(query);
+		} else {
+			throw new IllegalArgumentException(queryLanguage+ " is not a supported query language!");
 		}
 		Map<String, Object> requestMap = ast.getRequestMap();
 		mapper.writeValue(new File(outFile), requestMap);
@@ -54,9 +56,9 @@
 		String[] queries;
 		if (args.length==0) {
 			queries = new String[] {
-				"[base=foo]|([base=foo][base=bar])* meta author=Goethe&year=1815",
-				"([base=foo]|[base=foo])[base=foobar]",
-				"[base=foo]([base=foo]|[base=foobar])",
+					"shrink({[base=foo]})",
+					"shrink({[base=foo]}[orth=bar])",
+					"shrink(1:[base=Der]{1:[base=Mann]})",
 				};
 		} else {
 			queries = new String[] {args[0]};
@@ -66,7 +68,8 @@
 			i++;
 			try {
 				System.out.println(q);
-				jg.run(System.getProperty("user.home")+"/test"+i+".json", q, "poliqarp");
+				jg.run(q, "poliqarp", System.getProperty("user.home")+"/bsp"+i+".json");
+				System.out.println();
 			} catch (NullPointerException npe) {
 				npe.printStackTrace();
 				System.out.println("null\n");
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 0b6bacb..fd32c1b 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
@@ -126,7 +126,7 @@
 
 	@Override
 	public Map<String, Object> getRequestMap() {
-		return this.requestMap;
+		return requestMap;
 	}
 	
 	@Override
@@ -362,7 +362,6 @@
 		
 		if (nodeCat.equals("spanclass")) {
 			LinkedHashMap<String,Object> span = new LinkedHashMap<String,Object>();
-//			curObject = span;
 			objectStack.push(span);
 			ArrayList<Object> spanOperands = new ArrayList<Object>();
 			String id = "0";
@@ -370,7 +369,7 @@
 			if (getNodeCat(node.getChild(1)).equals("spanclass_id")) {
 				id = node.getChild(1).getChild(0).toStringTree(poliqarpParser);
 				id = id.substring(0, id.length()-1); // remove trailing colon ':'
-				// only allow class ids up to 255
+				// only allow class id up to 255
 				if (Integer.parseInt(id)>255) {
 					id = "0";
 				}
@@ -381,15 +380,17 @@
 			groupStack.push(spanOperands);
 			
 			// Step II: decide where to put the span
-			// add span to sequence only if it is not an only child (in that case, sq_segments has already added the info and is just waiting for the relevant info)
+			// add span to sequence only if it is not an only child (in that case, cq_segments has already added the info and is just waiting for the relevant info)
+			
 			if (node.getParent().getChildCount()>1) {
 				ArrayList<Object> topSequenceOperands = (ArrayList<Object>) sequenceStack.getFirst().get("operands");
 				topSequenceOperands.add(span);
 			} else if (openNodeCats.get(2).equals("query")) {
 				requestMap.put("query", span);	
 			} else if (groupStack.size()>1) {
-				groupStack.get(1).add(span);
+				groupStack.get(1).add(span); // second element because top element has been added here (spanOperands)
 			} 
+			objectStack.push(span);
 			
 		}
 		
@@ -417,8 +418,40 @@
 			} 
 		}
 		
-		if (nodeCat.equals("shrink") || nodeCat.equals("split")) {
-			//TODO
+		if (nodeCat.equals("shrink")) {
+			LinkedHashMap<String,Object> shrinkGroup = new LinkedHashMap<String,Object>();
+			objectStack.push(shrinkGroup);
+			sequenceStack.push(shrinkGroup);
+			ArrayList<Object> shrinkOperands = new ArrayList<Object>();
+			// Step I: get info
+			String operandClass = "0";
+			String type = getNodeCat(node.getChild(0));
+			if (getNodeCat(node.getChild(2)).equals("spanclass_id")) {
+				operandClass = node.getChild(2).getChild(0).toStringTree(poliqarpParser);
+				operandClass = operandClass.substring(0, operandClass.length()-1); // remove trailing colon ':'
+				// only allow class id up to 255
+				if (Integer.parseInt(operandClass)>255) {
+					operandClass = "0";
+				}
+			}
+			
+			shrinkGroup.put("@type", "korap:group");
+			shrinkGroup.put(type, operandClass);
+			shrinkGroup.put("operands", shrinkOperands);
+			groupStack.push(shrinkOperands);
+			
+			// Step II: decide where to put the group
+			// add group to sequence only if it is not an only child (in that case, sq_segments has already added the info and is just waiting for the relevant info)
+			if (node.getParent().getChildCount()>1) {
+				ArrayList<Object> topSequenceOperands = (ArrayList<Object>) sequenceStack.getFirst().get("operands");
+				topSequenceOperands.add(shrinkGroup);
+			} else if (openNodeCats.get(2).equals("query")) {
+				requestMap.put("query", shrinkGroup);	
+			} else if (groupStack.size()>1) {
+				groupStack.get(1).add(shrinkGroup);
+			} 
+			
+			visited.add(node.getChild(0));
 		}
 		
 		// repetition of token group
@@ -500,6 +533,12 @@
 			objectStack.pop();
 		}
 		
+		if (nodeCat.equals("shrink")) {
+			sequenceStack.pop();
+			objectStack.pop();
+		}
+		
+		
 		openNodeCats.pop();
 		
 	}
@@ -566,7 +605,11 @@
 //				"{[base=foo]}[orth=bar]",
 //				"{[base=foo]}{[orth=bar]}",
 //				"{1:[base=foo]<np>}",
+				"{[base=foo]}[orth=bar]",
 				"shrink({[base=foo]}[orth=bar])",
+				"shrink(1:[base=Der]{1:[base=Mann]})",
+				"{[base=foo][orth=bar]}",
+//				"[base=der]shrink(1:[base=Der]{1:[base=Mann]})"
 //				"<np>",
 //				"startsWith({<sentence>},<np>)",
 //				"startsWith({<sentence>},[base=foo])",
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpTree.java b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpTree.java
index 4913ab2..7716d2a 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpTree.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/PoliqarpTree.java
@@ -118,7 +118,7 @@
 
 	@Override
 	public Map<String, Object> getRequestMap() {
-		return this.requestMap;
+		return requestMap;
 	}
 	
 	@Override
