diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanAttributeQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanAttributeQuery.java
index c752776..150f060 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanAttributeQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanAttributeQuery.java
@@ -54,9 +54,10 @@
 	public String toString(String field) {
 		StringBuilder sb = new StringBuilder();
 		sb.append("spanAttribute(");
-		sb.append(firstClause.toString(field));
-		sb.append(",");
-		sb.append(isNegation ? "negated)" : "notNegated)");		
+		sb.append(firstClause.toString(field));		
+		if (isNegation)
+			sb.append( ", not");		
+		sb.append(")");
 		sb.append(ToStringUtils.boost(getBoost()));
 		return sb.toString();
 	}
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java
index cab5683..654cb52 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanExpansionQuery.java
@@ -10,49 +10,95 @@
 import org.apache.lucene.search.spans.Spans;
 import org.apache.lucene.util.Bits;
 
+import de.ids_mannheim.korap.query.spans.ExpandedExclusionSpans;
 import de.ids_mannheim.korap.query.spans.ExpandedSpans;
 
-/** Query to make a span longer by stretching out the start or 
- * 	the end position of the span.
+/** Query to make a span longer by stretching out the start or the end 
+ * 	position of the span. The constraints of the expansion, such as how 
+ * 	large the expansion should be (min and max position) and the 
+ * 	direction of the expansion with respect to the "main" span, are 
+ * 	specified in ExpansionConstraint.
+ * 
+ * 	The expansion can be specified to not contain any direct/immediate
+ * 	/adjacent occurrence(s) of another span. Examples:
+ * 		[orth=der][orth!=Baum] 		"der" cannot be followed by "Baum" 
+ * 		[pos!=ADJ]{1,2}[orth=Baum]	one or two adjectives cannot precedes 
+ * 									"Baum"
+ * 
+ *  The offsets of the expansion parts can be collected by using a class 
+ *  number. 
  * 
  * 	@author margaretha
  * */
 public class SpanExpansionQuery extends SimpleSpanQuery{
-
-	int min, max; 
-	byte classNumber;
-	boolean isBefore;
+	 
+	private int min, max; // min, max expansion position
 	
-	public SpanExpansionQuery(SpanQuery firstClause, int min, int max,  
-			boolean isBefore, boolean collectPayloads) {		
+	// if > 0, collect expansion offsets using this label
+	private byte classNumber;
+	
+	// expansion direction with regard to the main span: 
+	// < 0 	to the left of main span 
+	// >= 0  to the right of main span
+	private int direction;	
+	
+	// if true, no occurrence of another span
+	final boolean isExclusion; 
+	
+	/** Simple expansion for any/empty token. Use 
+	 * 	{@link #SpanExpansionQuery(SpanQuery, SpanQuery, ExpansionConstraint, 
+	 * 	boolean)} for expansion with exclusions of a specific spanquery. 
+	 * */
+	public SpanExpansionQuery(SpanQuery firstClause, int min, int max, int direction, 
+			boolean collectPayloads) {
 		super(firstClause, collectPayloads);
 		this.min = min;
 		this.max = max;
-		this.isBefore = isBefore;
+		this.direction = direction;
+		this.isExclusion = false;
 	}
 	
-	public SpanExpansionQuery(SpanQuery firstClause, int min, int max, 
-			byte classNumber, boolean isBefore, boolean collectPayloads) {		
-		this(firstClause, min,max,isBefore,collectPayloads);
+	public SpanExpansionQuery(SpanQuery firstClause, int min, int max, int direction, 
+			byte classNumber, boolean collectPayloads) {
+		this(firstClause, min, max, direction, collectPayloads);		
 		this.classNumber = classNumber;
 	}
-
+	
+	/** Expansion with exclusions of the spanquery specified as the second 
+	 * 	parameter.
+	 * */
+	public SpanExpansionQuery(SpanQuery firstClause, SpanQuery notClause, int min, 
+			int max, int direction, boolean collectPayloads) {
+		super(firstClause, notClause, collectPayloads);
+		this.min = min;
+		this.max = max;
+		this.direction = direction;
+		this.isExclusion = true;
+	}
+		
+	
 	@Override
 	public SimpleSpanQuery clone() {
-		SpanExpansionQuery sq = new SpanExpansionQuery(
-				firstClause, 
-				min, 
-				max, 
-				isBefore,
-				collectPayloads);
+		SpanExpansionQuery sq = null;
+		if (isExclusion){
+			sq = new SpanExpansionQuery(firstClause, secondClause, min, max, 
+					direction, collectPayloads);
+		}
+		else{
+			sq = new SpanExpansionQuery(firstClause, min, max, direction, classNumber,
+					collectPayloads);
+		}
 		//sq.setBoost(sq.getBoost());
 		return sq;
 	}
 
 	@Override
 	public Spans getSpans(AtomicReaderContext context, Bits acceptDocs,
-			Map<Term, TermContext> termContexts) throws IOException {
-		return new ExpandedSpans(this, context, acceptDocs, termContexts);
+			Map<Term, TermContext> termContexts) throws IOException {		 
+		if (isExclusion)
+			return new ExpandedExclusionSpans(this, context, acceptDocs, termContexts);		
+		else
+			return new ExpandedSpans(this, context, acceptDocs, termContexts);
 	}
 
 	@Override
@@ -60,14 +106,26 @@
 		StringBuilder sb = new StringBuilder();
 		sb.append("spanExpansion(");
 		sb.append(firstClause.toString());
-		sb.append(",[");
+		if (isExclusion && secondClause != null){
+			sb.append(", !");
+			sb.append(secondClause.toString());
+		}
+		else{
+			sb.append(", []");
+		}
+		sb.append("{");
 		sb.append(min);
-		sb.append(",");
+		sb.append(", ");
 		sb.append(max);
-		sb.append("],");		
-		if (isBefore)
-			sb.append("left)");
-		else sb.append("right)");
+		sb.append("}, ");		
+		if (direction < 0)
+			sb.append("left");
+		else sb.append("right");
+		if (classNumber > 0){
+			sb.append(", class:");
+			sb.append(classNumber);			
+		}
+		sb.append(")");
 		return sb.toString();
 	}
 
@@ -87,14 +145,6 @@
 		this.max = max;
 	}
 
-	public boolean isBefore() {
-		return isBefore;
-	}
-
-	public void setBefore(boolean isBefore) {
-		this.isBefore = isBefore;
-	}
-
 	public byte getClassNumber() {
 		return classNumber;
 	}
@@ -102,4 +152,12 @@
 	public void setClassNumber(byte classNumber) {
 		this.classNumber = classNumber;
 	}
+
+	public int getDirection() {
+		return direction;
+	}
+
+	public void setDirection(int direction) {
+		this.direction = direction;
+	}
 }
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanRepetitionQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanRepetitionQuery.java
index 97ecd0a..94b273b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanRepetitionQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanRepetitionQuery.java
@@ -50,13 +50,13 @@
 	@Override
 	public String toString(String field) {
 		StringBuilder sb = new StringBuilder();		
-		sb.append("spanQuantifier(");
+		sb.append("spanRepetition(");
 		sb.append(firstClause.toString(field));
-		sb.append("[");
+		sb.append("{");
 		sb.append(min);
-		sb.append(":");
+		sb.append(",");
 		sb.append(max);
-		sb.append("])");
+		sb.append("})");
 		sb.append(ToStringUtils.boost(getBoost()));
 		return sb.toString();
 	}
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ElementAttributeSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ElementAttributeSpans.java
index 9a1c13b..a378e1a 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ElementAttributeSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ElementAttributeSpans.java
@@ -122,7 +122,8 @@
 	 * */
 	private boolean checkNotElementRef() throws IOException{
 		for (AttributeSpans notAttribute: notAttributeList){
-			if (elements.start() == notAttribute.start() &&
+			if (!notAttribute.isFinish() && 
+					elements.start() == notAttribute.start() &&
 					elements.getElementRef() == notAttribute.getElementRef()){
 			        if (DEBUG)
 				    logger.info("not attribute ref exists");
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ExpandedSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ExpandedSpans.java
index 2f8ebed..68ae7f2 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ExpandedSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ExpandedSpans.java
@@ -20,7 +20,7 @@
 	
 	private int min, max;
 	private byte classNumber;
-	private boolean isBefore;	
+	private int direction;	
 	private List<CandidateSpan> candidateSpans;
 	private long matchCost;
 	
@@ -30,8 +30,8 @@
 		super(spanExpansionQuery, context, acceptDocs, termContexts);
 		this.min = spanExpansionQuery.getMin();
 		this.max = spanExpansionQuery.getMax();
+		this.direction = spanExpansionQuery.getDirection();
 		this.classNumber = spanExpansionQuery.getClassNumber();
-		this.isBefore = spanExpansionQuery.isBefore();
 		
 		candidateSpans = new ArrayList<CandidateSpan>();		
 		hasMoreSpans = true;		
@@ -63,7 +63,7 @@
 		CandidateSpan cs;
 		int counter, start, end;
 		
-		if (isBefore){
+		if (direction < 0 ){
 			counter = max;
 			while (counter >= min ){
 				start =  Math.max(0,firstSpans.start() - counter);			
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java
index 8a00787..5749746 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestAttributeIndex.java
@@ -233,6 +233,4 @@
 		assertEquals(1,kr.getMatch(0).getStartPos());
 		assertEquals(5,kr.getMatch(0).getEndPos());		
 	}
-	
-	
 }
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
index 038b157..a3e649b 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestMultipleDistanceIndex.java
@@ -179,7 +179,7 @@
 		constraints.add(createConstraint("p", 0, 0, false, false));
 		mdq = createQuery("s:b", "s:c", constraints,false);
 		kr = ki.search(mdq, (short) 10);		
-		assertEquals(3, kr.getTotalResults());		
+		assertEquals(3, kr.getTotalResults());	
 
 	}
     
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java
index 02df26c..243627c 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestRepetitionIndex.java
@@ -11,6 +11,7 @@
 import org.junit.Test;
 
 import de.ids_mannheim.korap.KorapIndex;
+import de.ids_mannheim.korap.KorapMatch;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.query.SpanNextQuery;
 import de.ids_mannheim.korap.query.SpanRepetitionQuery;
@@ -43,15 +44,15 @@
         fd.addString("ID", "doc-1");
         fd.addTV("base",
             "text",             
-            "[(0-1)s:b|_1#0-1|<>:s#0-2$<i>1]" +
-            "[(1-2)s:e|_2#1-2|<>:s#1-2$<i>4]" +             
+            "[(0-1)s:b|_1#0-1]" +
+            "[(1-2)s:e|_2#1-2]" +             
             "[(2-3)s:c|_3#2-3]" +
-            "[(3-4)s:c|s:d|_4#3-4]" + 
-            "[(4-5)s:d|_5#4-5|<>:s#4-5$<i>7]" +             
-            "[(5-6)s:e|_6#5-6]" +
+            "[(3-4)s:c|s:d]" + 
+            "[(4-5)s:d|s:c|_5#4-5]" +             
+            "[(5-6)s:e|s:c|_6#5-6]" +
     		"[(6-7)s:e|_7#6-7]" +	
-	        "[(7-8)s:c|_8#7-8|<>:x#7-9$<i>9]" + 
-	        "[(8-9)s:d|_9#8-9|<>:x#8-10$<i>10]" + 
+	        "[(7-8)s:c|_8#7-8]" + 
+	        "[(8-9)s:d|_9#8-9]" + 
 	        "[(9-10)s:d|_10#9-10]");
         return fd;
 	}
@@ -81,8 +82,7 @@
             "[(2-3)s:e|_3#2-3]");	
         return fd;
 	}
-	
-	
+
 	@Test
 	public void testCase1() throws IOException{
 		ki = new KorapIndex();
@@ -91,6 +91,7 @@
         
         SpanQuery sq, sq2;
         // Quantifier only
+        // c{1,2}
         sq = new SpanRepetitionQuery(new SpanTermQuery(new Term("base","s:c")),1,2, true);
         kr = ki.search(sq, (short) 10);
         // 0-1, 2-3, 2-4, 3-4, 5-6
@@ -133,10 +134,13 @@
         ki.commit();
         
         SpanQuery sq;
+        // c{2,2}
         sq = new SpanRepetitionQuery(new SpanTermQuery(new Term("base","s:c")),2,2, true);
         kr = ki.search(sq, (short) 10);
-        assertEquals(4,kr.getTotalResults());
-		
+        // doc1 2-4, 3-5, 4-6
+        assertEquals(6,kr.getTotalResults());
+        
+        // ec{2,2}
         kr = ki.search(sq, (short) 10); 
         sq = new SpanNextQuery(
         		new SpanTermQuery(new Term("base", "s:e")),
@@ -173,6 +177,26 @@
         assertEquals(6, kr.getMatch(1).endPos);
         assertEquals(7, kr.getMatch(2).startPos);
         assertEquals(9, kr.getMatch(2).endPos);
+
+	}
+	
+	@Test
+	public void testCase4() throws IOException {
+		ki = new KorapIndex();
+        ki.addDoc(createFieldDoc1());
+        ki.commit();
+        
+		SpanQuery sq;
+        // c{2,2}
+        sq = new SpanRepetitionQuery(new SpanTermQuery(new Term("base","s:c")),1,3, true);
+        kr = ki.search(sq, (short) 10);
+        // 2-3, 2-4, 2-5, 3-4, 3-5, 3-6, 4-5, 4-6, 5-6, 7-8  
+        assertEquals(10,kr.getTotalResults());
+        
+        sq = new SpanRepetitionQuery(new SpanTermQuery(new Term("base","s:c")),2,3, true);
+        kr = ki.search(sq, (short) 10);
+        // 2-4, 2-5, 3-5, 3-6, 4-6 
+        assertEquals(5,kr.getTotalResults());
         
 //        System.out.print(kr.getTotalResults()+"\n");
 //		for (int i=0; i< kr.getTotalResults(); i++){
@@ -180,7 +204,45 @@
 //				kr.match(i).getLocalDocID()+" "+
 //				kr.match(i).startPos + " " +
 //				kr.match(i).endPos
-//		    );
+//			);
 //		}
 	}
+	
+	@Test
+	public void testCase5() throws IOException {
+		ki = new KorapIndex();
+		for (String i : new String[] {"AAA-12402"}) {
+		    ki.addDocFile(
+		        getClass().getResource("/wiki/" + i + ".json.gz").getFile(), true
+	            );
+		};
+		ki.commit();
+		
+		SpanQuery sq0, sq1, sq2;
+		sq0 = new SpanTermQuery(new Term("tokens", "s:Mann"));
+		sq1 = new SpanRepetitionQuery(new SpanTermQuery(new Term("tokens","cnx/p:A")),2,3, true);
+        sq2 = new SpanNextQuery(sq1,sq0);        
+        kr = ki.search(sq2, (short) 10);
+        
+        assertEquals(2,kr.getTotalResults());
+        assertEquals(672, kr.getMatch(0).getStartPos());
+        assertEquals(676, kr.getMatch(0).getEndPos());
+        assertEquals(673, kr.getMatch(1).getStartPos());
+        assertEquals(676, kr.getMatch(1).getEndPos());
+        
+        
+        sq2 = new SpanNextQuery(
+        		new SpanTermQuery(new Term("tokens", "s:scheinbar")),
+        		sq2);
+        kr = ki.search(sq2, (short) 10);
+        
+        assertEquals(1,kr.getTotalResults());
+        assertEquals(672, kr.getMatch(0).getStartPos());
+        assertEquals(676, kr.getMatch(0).getEndPos());
+        
+      /*  for (KorapMatch km : kr.getMatches()){
+        	System.out.println(km.getSnippetBrackets());
+        	System.out.println(km.getStartPos() +","+km.getEndPos());
+        }*/
+	}
 }
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
index 4c1704e..1a9524a 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSpanExpansionIndex.java
@@ -34,7 +34,7 @@
 	public void testCase1() throws IOException {
 		
 		SpanTermQuery stq = new SpanTermQuery(new Term("tokens","s:Kaiser")	);
-		SpanExpansionQuery seq = new SpanExpansionQuery(stq, 0, 2, true, true);		
+		SpanExpansionQuery seq = new SpanExpansionQuery(stq, 0, 2, -1, true);		
 		kr = ki.search(seq, (short) 10);
 		
 		assertEquals(72,kr.getTotalResults());
@@ -45,7 +45,7 @@
         assertEquals(7, kr.getMatch(2).getStartPos());
         assertEquals(8, kr.getMatch(2).getEndPos());
         
-        seq = new SpanExpansionQuery(stq, 3, 4, false, true);
+        seq = new SpanExpansionQuery(stq, 3, 4, 0, true);
         kr = ki.search(seq, (short) 10);
         
         assertEquals(7, kr.getMatch(0).getStartPos());
@@ -57,11 +57,11 @@
         assertEquals(15, kr.getMatch(3).getStartPos());
         assertEquals(20, kr.getMatch(3).getEndPos());
         
-//		for (KorapMatch km : kr.getMatches()){
-//			System.out.println(km.getStartPos() +","+km.getEndPos()+" "
-//					+km.getSnippetBrackets());
-//		}	
-		
+		/*for (KorapMatch km : kr.getMatches()){
+			System.out.println(km.getStartPos() +","+km.getEndPos()+" "
+					+km.getSnippetBrackets());
+		}	
+		*/
 	}
 	
 	/** Classnumber
@@ -73,12 +73,12 @@
 		
 		// create new payload for the expansion offsets
 		SpanTermQuery stq = new SpanTermQuery(new Term("tokens","s:Kaiser")	);
-		SpanExpansionQuery sq = new SpanExpansionQuery(stq, 0, 2, classNumber, true, true);		
+		SpanExpansionQuery sq = new SpanExpansionQuery(stq, 0, 2, -1, classNumber, true);		
 		kr = ki.search(sq, (short) 10);
 				
 		// add expansion offsets to the existing payload
 		SpanElementQuery seq = new SpanElementQuery("tokens", "cnx/c:np");
-		sq = new SpanExpansionQuery(seq, 1, 2, classNumber, false, true);		
+		sq = new SpanExpansionQuery(seq, 1, 2, 0, classNumber, true);		
 		kr = ki.search(sq, (short) 10);
 		
 		/*for (KorapMatch km : kr.getMatches()){		
@@ -87,4 +87,39 @@
 		}*/
 	}
 	
+	
+	/** Expansion with exclusion
+	 * */
+	@Test
+	public void testCase3() throws IOException {
+		
+		SpanTermQuery stq = new SpanTermQuery(new Term("tokens","cnx/p:N")	);
+		SpanTermQuery notQuery = new SpanTermQuery(new Term("tokens","s:September"));
+		
+		SpanExpansionQuery seq = new SpanExpansionQuery(stq, notQuery, 2, 3, 0, true);		
+		kr = ki.search(seq, (short) 20);
+		
+		/*for (KorapMatch km : kr.getMatches()){
+			System.out.println(km.getStartPos() +","+km.getEndPos()+" "
+					+km.getSnippetBrackets());
+		}*/
+	}
+	
+	/** Expansion with exclusion
+	 * */
+	@Test
+	public void testCase4() throws IOException {
+		
+		SpanTermQuery stq = new SpanTermQuery(new Term("tokens","cnx/p:N")	);
+		SpanTermQuery notQuery = new SpanTermQuery(new Term("tokens","cnx/p:A"));
+		
+		SpanExpansionQuery seq = new SpanExpansionQuery(stq, notQuery, 0, 2, -1, true);		
+		kr = ki.search(seq, (short) 10);
+		
+		for (KorapMatch km : kr.getMatches()){
+			System.out.println(km.getStartPos() +","+km.getEndPos()+" "
+					+km.getSnippetBrackets());
+		}
+	}
+	
 }
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java
index ae2cef4..179effa 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestSubSpanIndex.java
@@ -54,7 +54,7 @@
 		kr = ki.search(ssq, (short) 10);
 		
 		assertEquals(34, kr.getMatch(0).getStartPos());
-        assertEquals(35, kr.getMatch(0).getEndPos());
+        assertEquals(36, kr.getMatch(0).getEndPos());
         assertEquals(85, kr.getMatch(1).getStartPos());
         assertEquals(87, kr.getMatch(1).getEndPos());
 	}
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java
index b9f7065..ddff51d 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestUnorderedDistanceIndex.java
@@ -283,7 +283,7 @@
 		        getClass().getResource("/a00/" + i + ".json.gz").getFile(), true
 	            );
 		};
-		ki.commit();	    	
+		ki.commit();
 		
 		SpanQuery sq = new SpanDistanceQuery(
         		new SpanTermQuery(new Term("tokens","s:in")),
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
index a5a945e..4f6226d 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
@@ -84,6 +84,12 @@
 		ks = new KorapSearch(sq);
 		kr = ks.run(ki);
 		assertEquals(11, kr.getTotalResults());
+		//System.out.println(kr.getTotalResults());
+		//for (KorapMatch km : kr.getMatches()){
+			//System.out.println(km.getDocID() +" "+km.getStartPos() +" "+ km.getEndPos());
+        	//System.out.println(km.getSnippetBrackets());
+        	//System.out.println(km.toJSON());
+        //}	
 	}
 	
 	/** Token exclusion distance spans */
@@ -107,12 +113,6 @@
 		ks = new KorapSearch(sq);
 		kr = ks.run(ki);
 		assertEquals(1896, kr.getTotalResults());	
-		
-//		System.out.println(kr.getTotalResults());
-//		for (KorapMatch km : kr.getMatches()){
-//			System.out.println(km.getDocID() +" "+km.getStartPos() +" "+ km.getEndPos());
-//        	System.out.println(km.getSnippetBrackets());
-//        }
 	}
 	
 	/** Element distance spans */
@@ -169,7 +169,7 @@
 		assertEquals(451,kr.getMatch(1).getEndPos());		
 	}
 			
-	/** Quantifier */
+	/** Repetition */
 	@Test
 	public void testCase5() throws IOException{
 		SpanQuery sq;
@@ -191,7 +191,7 @@
 		//0.65s
 	}
 	
-	/** Next and quantifier */
+	/** Next and repetition */
 	@Test
 	public void testCase6() throws IOException{
 		SpanQuery sq = new SpanNextQuery(
diff --git a/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java b/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
index da0d5d7..0d99899 100644
--- a/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
+++ b/src/test/java/de/ids_mannheim/korap/query/TestKorapQueryJSON.java
@@ -1,3 +1,5 @@
+package de.ids_mannheim.korap.query;
+
 import java.util.*;
 import java.io.*;
 
@@ -25,7 +27,7 @@
 	// There is a repetition in here
 	// ([base=foo]|[base=bar])[base=foobar]
 	assertEquals(sqwi.toQuery().toString(),
-            "spanOr([tokens:base:foo, spanQuantifier(spanNext(tokens:base:foo, tokens:base:bar)[1:100])])");
+            "spanOr([tokens:base:foo, spanRepetition(spanNext(tokens:base:foo, tokens:base:bar){1,100})])");
 	assertTrue(sqwi.isOptional());
     };
 
@@ -269,7 +271,7 @@
 	SpanQueryWrapperInterface sqwi = jsonQuery(getClass().getResource("/queries/bsp-repetition.jsonld").getFile());
 
 	// der[cnx/p=A]{0,2}[tt/p=NN]
-	assertEquals(sqwi.toQuery().toString(), "spanNext(spanOr([tokens:s:der, spanNext(tokens:s:der, spanQuantifier(tokens:cnx/p:A[1:2]))]), tokens:tt/p:NN)");
+	assertEquals(sqwi.toQuery().toString(), "spanNext(spanOr([tokens:s:der, spanNext(tokens:s:der, spanRepetition(tokens:cnx/p:A{1,2}))]), tokens:tt/p:NN)");
     };
 
     public static String getString (String path) {
