diff --git a/src/main/java/de/ids_mannheim/korap/query/SimpleSpanQuery.java b/src/main/java/de/ids_mannheim/korap/query/SimpleSpanQuery.java
index b053fd4..1e24d7f 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SimpleSpanQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SimpleSpanQuery.java
@@ -8,25 +8,31 @@
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.spans.SpanQuery;
 
-/** An abstract class for a Spanquery having two clauses. 
+/** A base class for Spanqueries 
  * 
  * 	@author margaretha
  * */
-public abstract class SimpleSpanQuery extends SpanQuery implements Cloneable{		
+public abstract class SimpleSpanQuery extends SpanQuery 
+		implements Cloneable{		
 	
 	protected SpanQuery firstClause, secondClause;
 	private String field;
 	protected boolean collectPayloads;
     
+	public SimpleSpanQuery(SpanQuery firstClause, boolean collectPayloads) {
+    	this.field = firstClause.getField();
+    	this.setFirstClause(firstClause);
+    	this.collectPayloads = collectPayloads;
+	}  
+	
     public SimpleSpanQuery(SpanQuery firstClause, SpanQuery secondClause, 
     		boolean collectPayloads) {
-    	this.field = secondClause.getField();
-    	if (!firstClause.getField().equals(field)){
-    		throw new IllegalArgumentException("Clauses must have the same field.");
+    	this(firstClause,collectPayloads);
+    	if (!secondClause.getField().equals(field)){
+    		throw new IllegalArgumentException(
+    				"Clauses must have the same field.");
     	}    	
-    	this.setFirstClause(firstClause);
     	this.setSecondClause(secondClause);  	
-    	this.collectPayloads = collectPayloads;
 	}  
     	
 	@Override
@@ -62,25 +68,32 @@
 	@Override
     public void extractTerms(Set<Term> terms) {
 		firstClause.extractTerms(terms);
-		secondClause.extractTerms(terms);
+		if (secondClause != null)
+			secondClause.extractTerms(terms);
     };
     
 	@Override
 	public Query rewrite(IndexReader reader) throws IOException {		
 		SimpleSpanQuery clone = null;
-		SpanQuery query = (SpanQuery) firstClause.rewrite(reader);
-		if (!query.equals(firstClause)) {
-			if (clone == null) clone = clone();
-	    	clone.firstClause = query;
-		}		
-		query = (SpanQuery) secondClause.rewrite(reader);
-		if (!query.equals(secondClause)) {		
-			if (clone == null) clone = clone();
-		    clone.secondClause = query;
+		clone = updateClone(reader, clone, firstClause, 1);			
+		if (secondClause != null){
+		    clone = updateClone(reader, clone, secondClause, 2);			
 		}
 		return (clone != null ? clone : this );		
 	}	
 	
+	private SimpleSpanQuery updateClone(IndexReader reader, SimpleSpanQuery clone, 
+			 SpanQuery sq, int clauseNumber) throws IOException{
+		SpanQuery query = (SpanQuery) sq.rewrite(reader);
+		if (!query.equals(sq)) {
+			if (clone == null) clone = clone();
+			if (clauseNumber == 1) 
+				clone.firstClause = query;			
+			else clone.secondClause = query;
+		}
+		return clone;
+	}
+	
 	public abstract SimpleSpanQuery clone();	
 	
 }
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanNextQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanNextQuery.java
index 6a51062..a15d80d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/SpanNextQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanNextQuery.java
@@ -42,8 +42,7 @@
     @Override
     public Spans getSpans (final AtomicReaderContext context, Bits acceptDocs,
 		   Map<Term,TermContext> termContexts) throws IOException {	
-		return (Spans) new NextSpans (this, context, acceptDocs, 
-				termContexts);
+		return (Spans) new NextSpans (this, context, acceptDocs, termContexts);
     };
 
     @Override
diff --git a/src/main/java/de/ids_mannheim/korap/query/SpanQuantifierQuery.java b/src/main/java/de/ids_mannheim/korap/query/SpanQuantifierQuery.java
new file mode 100644
index 0000000..85b881b
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/query/SpanQuantifierQuery.java
@@ -0,0 +1,74 @@
+package de.ids_mannheim.korap.query;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.lucene.index.AtomicReaderContext;
+import org.apache.lucene.index.Term;
+import org.apache.lucene.index.TermContext;
+import org.apache.lucene.search.spans.SpanQuery;
+import org.apache.lucene.search.spans.Spans;
+import org.apache.lucene.util.Bits;
+import org.apache.lucene.util.ToStringUtils;
+
+import de.ids_mannheim.korap.query.spans.QuantifierSpans;
+
+public class SpanQuantifierQuery extends SimpleSpanQuery{
+	
+	private int min, max;
+	
+	public SpanQuantifierQuery(SpanQuery sq, int min, int max,
+			boolean collectPayloads) {
+		super(sq, collectPayloads);
+		this.min = min;
+		this.max = max;
+	}
+
+	@Override
+	public SimpleSpanQuery clone() {
+		SpanQuantifierQuery sq = new SpanQuantifierQuery(
+				(SpanQuery) this.firstClause.clone(), 
+				this.min, 
+				this.max, 
+				this.collectPayloads);
+		sq.setBoost(getBoost());
+		return sq;
+	}
+
+	@Override
+	public Spans getSpans(AtomicReaderContext context, Bits acceptDocs,
+			Map<Term, TermContext> termContexts) throws IOException {
+		return new QuantifierSpans(this, context, acceptDocs, termContexts);
+	}
+
+	@Override
+	public String toString(String field) {
+		StringBuilder sb = new StringBuilder();		
+		sb.append("spanQuantifier(");
+		sb.append(firstClause.toString(field));
+		sb.append("[");
+		sb.append(min);
+		sb.append(":");
+		sb.append(max);
+		sb.append("])");
+		sb.append(ToStringUtils.boost(getBoost()));
+		return sb.toString();
+	}
+
+	public int getMin() {
+		return min;
+	}
+
+	public void setMin(int min) {
+		this.min = min;
+	}
+
+	public int getMax() {
+		return max;
+	}
+
+	public void setMax(int max) {
+		this.max = max;
+	}
+	
+}
