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 a84249f..7f5d257 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
@@ -17,6 +17,7 @@
 import de.ids_mannheim.korap.query.cosmas2.c2psLexer;
 import de.ids_mannheim.korap.query.cosmas2.c2psParser;
 import de.ids_mannheim.korap.query.serialize.AbstractSyntaxTree;
+import de.ids_mannheim.korap.query.serialize.util.CosmasCondition;
 import de.ids_mannheim.korap.util.QueryException;
 
 /**
@@ -94,13 +95,13 @@
 
 	private boolean hasSequentiableSiblings;
 
-	private LinkedHashMap<String, Object> bedElem;
-	
 	/**
 	 * Keeps track of operands lists that are to be serialised in an inverted
 	 * order (e.g. the IN() operator) compared to their AST representation. 
 	 */
 	private LinkedList<ArrayList<Object>> invertedOperandsLists = new LinkedList<ArrayList<Object>>();
+	
+	private LinkedList<ArrayList<ArrayList<Object>>> distributedOperandsLists = new LinkedList<ArrayList<ArrayList<Object>>>();
 	/**
 	 * 
 	 * @param tree The syntax tree as returned by ANTLR
@@ -174,7 +175,6 @@
 		stackedObjects = 0;
 		
 		if (debug) {
-//			System.out.println(distantTokensStack);
 			System.err.println(" "+objectStack);
 			System.out.println(openNodeCats);
 		}
@@ -217,21 +217,6 @@
 			}
 		}
 		
-		
-		// C2QP is tree root
-		if (nodeCat.equals("C2PQ")) {
-//			if (node.getChildCount()>1) {
-//				// Step I: create sequence
-//				LinkedHashMap<String, Object> sequence = new LinkedHashMap<String, Object>();
-//				sequence.put("@type", "korap:sequence");
-//				sequence.put("operands", new ArrayList<Object>());
-//				objectStack.push(sequence);
-//				stackedObjects++;
-//				// Step II: decide where to put sequence
-//				requestMap.put("query", sequence);
-//			}
-		}
-		
 		// Nodes introducing tokens. Process all in the same manner, except for the fieldMap entry
 		if (nodeCat.equals("OPWF") || nodeCat.equals("OPLEM") || nodeCat.equals("OPMORPH")) {
 			
@@ -240,24 +225,6 @@
 			token.put("@type", "korap:token");
 			objectStack.push(token);
 			stackedObjects++;
-			// check if this token comes after a distant operator (like "/+w3:4") and if yes,
-			// insert the empty tokenGroups before the current token
-//			if (openNodeCats.get(1).equals("ARG2")) {
-//				if (openNodeCats.get(2).equals("OPPROX") && !distantTokensStack.isEmpty()) {
-//					for (List<Object> distantTokenGroup : distantTokensStack.pop()) {
-////						if (tokenGroupsStack.isEmpty()) {
-////							queryMap.put("token"+tokenGroupCount+"_1", distantTokenGroup);
-////						} else {
-//						tokenStack.getFirst().put("token", distantTokenGroup);
-////						}
-////						tokenGroupCount++;
-//					}
-//				}  
-				// check negation of token by preceding OPNOT
-//				else if (openNodeCats.get(2).equals("OPNOT")) {
-//					negate = true;
-//				}
-//			}
 			LinkedHashMap<String, Object> fieldMap = new LinkedHashMap<String, Object>();
 			token.put("@value", fieldMap);
 			
@@ -303,29 +270,6 @@
 			putIntoSuperObject(elem);
 		}
 		
-//		// negate every token that's under OPNOT > ARG2
-//		if (nodeCat.equals("ARG2") && openNodeCats.get(1).equals("OPNOT")) {
-//			negate = true;
-//		}
-		
-//		if (nodeCat.equals("ARG1") || nodeCat.equals("ARG2")) {
-//			if (node.getChildCount()>1) {
-//				// Step I: create sequence
-//				LinkedHashMap<String, Object> sequence = new LinkedHashMap<String, Object>();
-//				sequence.put("@type", "korap:sequence");
-//				sequence.put("operands", new ArrayList<Object>());
-//				objectStack.push(sequence);
-//				stackedObjects++;
-//				// Step II: decide where to put sequence
-//				if (objectStack.size()>1) {
-//					ArrayList<Object> topObjectOperands = (ArrayList<Object>) objectStack.get(1).get("operands");
-//					topObjectOperands.add(sequence);
-//				} else {
-//					requestMap.put("query", sequence);
-//				}
-//			}
-//		}
-		
 		if (nodeCat.equals("OPOR") || nodeCat.equals("OPAND") || nodeCat.equals("OPNOT")) {
 			// Step I: create group
 			LinkedHashMap<String, Object> disjunction = new LinkedHashMap<String, Object>();
@@ -483,24 +427,27 @@
 		if (nodeCat.equals("OPBED")) {
 			// Step I: create group
 			int optsChild = node.getChildCount()-1;
-			Tree conditions = node.getChild(optsChild);
+			Tree conditions = node.getChild(optsChild).getChild(0);
+			// Distinguish two cases. Normal case: query has just one condition, like #BED(XY, sa) ...
 			if (conditions.getChildCount()==1) {
 				LinkedHashMap<String, Object> posgroup = new LinkedHashMap<String, Object>();
 				posgroup.put("@type", "korap:group");
 				posgroup.put("relation", "position");
-				String cond = conditions.getChild(0).getChild(0).getText(); //(OPBED (OPWF "xyz") (OPTS (TPBEG se)))
-				//TODO: minus
-				String elem = cond.startsWith("+") ? cond.substring(1,2) : cond.substring(0,1);
-				bedElem = new LinkedHashMap<String, Object>();
+				CosmasCondition c = new CosmasCondition(conditions.getChild(0));
+				posgroup.put("position", c.position);
+				if (c.negated) posgroup.put("@subtype", "excl");
+				ArrayList<Object> operands = new ArrayList<Object>();
+				posgroup.put("operands", operands);
+				LinkedHashMap<String, Object> bedElem = new LinkedHashMap<String, Object>();
+				operands.add(bedElem);
 				bedElem.put("@type", "korap:elem");
-				bedElem.put("@value", elem);
-				String position = cond.substring(cond.length()-1).equals("a") ? "startswith" : "endswith";
-				posgroup.put("position", position);
-				posgroup.put("operands", new ArrayList<Object>());
+				bedElem.put("@value", c.elem);
 				objectStack.push(posgroup);
 				stackedObjects++;
 				// Step II: decide where to put
 				putIntoSuperObject(posgroup, 1);
+			// ... or the query has several conditions specified, like #BED(XY, sa,-pa). In that case,
+			//     create an 'and' group and embed the position groups in its operands
 			} else {
 				// node has several conditions (like 'sa, -pa')
 				// -> create 'and' group and embed all position groups there
@@ -509,9 +456,31 @@
 				conjunct.put("relation", "and");
 				ArrayList<Object> operands = new ArrayList<Object>();
 				conjunct.put("operands", operands);
+				ArrayList<ArrayList<Object>> distributedOperands = new ArrayList<ArrayList<Object>>();
+				
 				for (int i=0; i<conditions.getChildCount(); i++) {
-					// TODO for each condition, create a position group. problem: how to get argument into every operands list?
+					// for each condition, create a position group. problem: how to get argument into every operands list?
+					// -> use distributedOperandsLists
+					LinkedHashMap<String, Object> posGroup = new LinkedHashMap<String, Object>();
+					operands.add(posGroup);
+					
+					CosmasCondition c = new CosmasCondition(conditions.getChild(i));
+					posGroup.put("@type", "korap:group");
+					posGroup.put("relation", "position");
+					posGroup.put("position", c.position);
+					if (c.negated) posGroup.put("@subtype", "excl");
+					ArrayList<Object> posOperands = new ArrayList<Object>();
+					distributedOperands.add(posOperands);
+					posGroup.put("operands", posOperands);
+					LinkedHashMap<String, Object> bedElem = new LinkedHashMap<String, Object>();
+					posOperands.add(bedElem);
+					bedElem.put("@type", "korap:elem");
+					bedElem.put("@value", c.elem);
+					
+					
 				}
+				putIntoSuperObject(conjunct, 0);
+				distributedOperandsLists.push(distributedOperands);
 			}
 
 		}
@@ -545,13 +514,6 @@
 			}
 		}
 		
-		if (nodeCat.equals("OPBED")) {
-			System.err.println(objectStack);
-			@SuppressWarnings("unchecked")
-			ArrayList<Object> topObjectOperands = (ArrayList<Object>) objectStack.get(0).get("operands");
-			topObjectOperands.add(0, bedElem);
-		}
-		
 		for (int i=0; i<objectsToPop.get(0); i++) {
 			objectStack.pop();
 		}
@@ -566,7 +528,6 @@
 	}
 
 	
-
 	private void parseOPINOptions(Tree node, LinkedHashMap<String, Object> posgroup) {
 		Tree posnode = QueryUtils.getFirstChildWithCat(node, "POS");
 		Tree rangenode = QueryUtils.getFirstChildWithCat(node, "RANGE");
@@ -673,7 +634,12 @@
 	
 	@SuppressWarnings("unchecked")
 	private void putIntoSuperObject(LinkedHashMap<String, Object> object, int objStackPosition) {
-		if (objectStack.size()>objStackPosition) {
+		if (distributedOperandsLists.size()>0) {
+			ArrayList<ArrayList<Object>> distributedOperands = distributedOperandsLists.pop();
+			for (ArrayList<Object> operands : distributedOperands) {
+				operands.add(object);
+			}
+		} else if (objectStack.size()>objStackPosition) {
 			ArrayList<Object> topObjectOperands = (ArrayList<Object>) objectStack.get(objStackPosition).get("operands");
 			if (!invertedOperandsLists.contains(topObjectOperands)) {
 				topObjectOperands.add(object);
@@ -717,76 +683,6 @@
 		 */
 		String[] queries = new String[] {
 				/* COSMAS 2 */
-//				"&Mond",
-//				"Mond Sterne",
-//				"Mond*",
-//				"Mond oder Sterne",
-//				"(des oder eines) /+w2 (Bauern oder Bauers oder Bauerns)",
-//				"(Sonne /+w2 Mond) /+w2:3 Sterne",
-//				"Mond oder Sonne /w2 Sterne",
-//				"MORPH(V PCP)",
-//				"MORPH(V PCP) Baum" ,
-//				"Sonne %w2 Mond",
-//				"Sonne /w2 Mond",
-//				"Sonne nicht (Mond Stern)",
-//				"Sonne nicht (Mond oder Stern)",
-//				"Sonne /+w1:4 Mond",
-//				"(sonne und mond) oder sterne",
-//				"(stern oder (sonne und mond)) und MORPH(V PCP)",
-//				"(sonne und (stern oder mond)) /+w2 luna???",
-//				"(Tag /+w2 $offenen) /+w1 Tür",
-//				"heißt /+w2 \"und\" ,"
-//				"der",
-//				"der Mann",
-//				"Sonne nicht (Mond Stern)",
-//				"Sonne /+w1:4 Mond",
-//				"wegen #IN(L) <s>"
-//				"#BEG(<s>) /5w,s0 #END(<s>)",
-//				"der Mann",
-//				"Mond oder Sterne",
-//				"(Sonne scheint) oder Mond"
-//				"Sonne oder Mond oder Sterne",
-//				"Mann #OV (der Mann)",
-//				"Mann #OV(L) der Mann"
-//				"*tür",
-//				"#BED(der, sa)",
-//				"das %w3 Haus",
-//				"das /w3 Haus"
-//				"#ALL(gehen /w1:10 voran)",
-//				"#NHIT(gehen /w1:10 voran)",
-//				"das /w1:2,s0 Haus",
-//				"das /w1:2 Haus und Hof",
-//				"nicht Frau",
-//				"#BED(der , sa)",
-//				"#ALL(gehen /w1:10 voran)",
-//				"#NHIT(gehen /w1:10 voran)",
-//				"das /w1:2,s0 Haus",
-//				"das /w1:2 Haus und Hof",
-//				"#ELEM(S)",
-//				"#BED(der , sa)",
-//				"#BED(der , se)",
-//				"#BED(der Mann , +pe)",
-//				"Mond nicht Sonne Sterne"
-				"wegen #OV(L) #ELEM(S)",
-				"wegen #OV #ELEM(S)",
-				"wegen #IN #ELEM(S)",
-//				"Sonne oder Mond"
-				"wegen #IN('FE,ALL,%,MIN') <s>",
-				"wegen #IN('FE,ALL,MIN') <s>",
-				"wegen #IN <s>",
-				"wegen #IN(L) <s>",
-				"wegen #IN(%, L) <s>",
-				"wegen #OV('FE,%,MIN') <s>",
-				"#BEG(der /+w1:2 Mann)",
-				"#BEG(der Mann /10w Mann)",
-				"#BED(der Mann , sa,+pe)",
-//				"#BED(der Mann , +pe)"
-				/*
-				 * TODO
-				 * http://www.ids-mannheim.de/cosmas2/win-app/hilfe/suchanfrage/eingabe-grafisch/syntax/ARGUMENT_I.html
-				 * http://www.ids-mannheim.de/cosmas2/win-app/hilfe/suchanfrage/eingabe-grafisch/syntax/textpositionen.html#Kuerzel
-				 * 
-				 */
 				};
 		CosmasTree.debug=true;
 		for (String q : queries) {
diff --git a/src/test/java/CosmasTreeTest.java b/src/test/java/CosmasTreeTest.java
index d30e9ff..e16f8d8 100644
--- a/src/test/java/CosmasTreeTest.java
+++ b/src/test/java/CosmasTreeTest.java
@@ -449,7 +449,7 @@
 	@Test
 	public void testOPALL() throws QueryException {
 		query="#ALL(gehen /w1:10 voran)";
-		String all1 = 
+		String all1 =
 				"{@type=korap:group, relation=distance, match=all, @subtype=incl, " +
 					"constraint=[" +
 						"{@type=korap:distance, measure=w, direction=both, min=1, max=10}" +
@@ -487,7 +487,7 @@
 		query = "#BED(der , sa)";
 		String bed1 = 
 				"{@type=korap:group, relation=position, position=startswith, operands=[" +
-						"{@type=korap:elem, @value=s}," +
+					"{@type=korap:elem, @value=s}," +
 					"{@type=korap:token, @value={@type=korap:term, @value=orth:der, relation==}}" +
 				"]}";
 		ppt = new CosmasTree(query);
