diff --git a/src/test/java/PoliqarpPlusTreeJSONTest.java b/src/test/java/PoliqarpPlusTreeJSONTest.java
index 8f03dd8..3b8417b 100644
--- a/src/test/java/PoliqarpPlusTreeJSONTest.java
+++ b/src/test/java/PoliqarpPlusTreeJSONTest.java
@@ -2,12 +2,9 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
 
 import org.junit.Test;
 
-import com.fasterxml.jackson.core.JsonPointer;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -185,7 +182,7 @@
 		assertEquals("deutscher",			operands.get(0).at("/wrap/key").asText());
 		assertEquals("orth",				operands.get(0).at("/wrap/layer").asText());
 		assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
-		assertEquals("true",				operands.get(0).at("/wrap/caseInsensitive").asText());
+		assertEquals(true,					operands.get(0).at("/wrap/caseInsensitive").asBoolean());
 		assertEquals("korap:token",			operands.get(1).at("/@type").asText());
 		assertEquals("Bundestag",			operands.get(1).at("/wrap/key").asText());
 		assertEquals("orth",				operands.get(1).at("/wrap/layer").asText());
@@ -202,7 +199,7 @@
 		assertEquals("deutscher",			operands.get(0).at("/wrap/key").asText());
 		assertEquals("orth",				operands.get(0).at("/wrap/layer").asText());
 		assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
-		assertEquals("true",				operands.get(0).at("/wrap/caseInsensitive").asText());
+		assertEquals(true,					operands.get(0).at("/wrap/caseInsensitive").asBoolean());
 		assertEquals("korap:token",			operands.get(1).at("/@type").asText());
 		assertEquals("Bundestag",			operands.get(1).at("/wrap/key").asText());
 		assertEquals("orth",				operands.get(1).at("/wrap/layer").asText());
@@ -282,7 +279,7 @@
 		assertEquals("match:ne",			operands.get(0).at("/match").asText());
 		assertEquals("korap:term",			operands.get(1).at("/@type").asText());
 		assertEquals("id",					operands.get(1).at("/key").asText());
-		assertEquals("7",					operands.get(1).at("/value").asText());
+		assertEquals(7,						operands.get(1).at("/value").asInt());
 		assertEquals("match:ne",			operands.get(1).at("/match").asText());
 	}
 	
@@ -291,16 +288,14 @@
 		query = "[base=der][][base=Mann]";
 		qs.setQuery(query, "poliqarpplus");
 		res = mapper.readTree(qs.toJSON());
-		qs.setQuery(query, "poliqarpplus");
-		res = mapper.readTree(qs.toJSON());
 		assertEquals("korap:group", 		res.at("/query/@type").asText());
 		assertEquals("operation:sequence",	res.at("/query/operation").asText());
 		assertEquals("true",				res.at("/query/inOrder").asText());
 		assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
 		assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
 		assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
-		assertEquals("2",					res.at("/query/distances").elements().next().at("/boundary/min").asText());
-		assertEquals("2",					res.at("/query/distances").elements().next().at("/boundary/max").asText());
+		assertEquals(2,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
+		assertEquals(2,						res.at("/query/distances").elements().next().at("/boundary/max").asInt());
 		operands = Lists.newArrayList(res.at("/query/operands").elements());
 		assertEquals("korap:token",			operands.get(0).at("/@type").asText());
 		assertEquals("der",					operands.get(0).at("/wrap/key").asText());
@@ -314,16 +309,14 @@
 		query = "[base=der][][][base=Mann]";
 		qs.setQuery(query, "poliqarpplus");
 		res = mapper.readTree(qs.toJSON());
-		qs.setQuery(query, "poliqarpplus");
-		res = mapper.readTree(qs.toJSON());
 		assertEquals("korap:group", 		res.at("/query/@type").asText());
 		assertEquals("operation:sequence",	res.at("/query/operation").asText());
 		assertEquals("true",				res.at("/query/inOrder").asText());
 		assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
 		assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
 		assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
-		assertEquals("3",					res.at("/query/distances").elements().next().at("/boundary/min").asText());
-		assertEquals("3",					res.at("/query/distances").elements().next().at("/boundary/max").asText());
+		assertEquals(3,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
+		assertEquals(3,						res.at("/query/distances").elements().next().at("/boundary/max").asInt());
 		operands = Lists.newArrayList(res.at("/query/operands").elements());
 		assertEquals("korap:token",			operands.get(0).at("/@type").asText());
 		assertEquals("der",					operands.get(0).at("/wrap/key").asText());
@@ -337,16 +330,14 @@
 		query = "[base=der][][]?[base=Mann]";
 		qs.setQuery(query, "poliqarpplus");
 		res = mapper.readTree(qs.toJSON());
-		qs.setQuery(query, "poliqarpplus");
-		res = mapper.readTree(qs.toJSON());
 		assertEquals("korap:group", 		res.at("/query/@type").asText());
 		assertEquals("operation:sequence",	res.at("/query/operation").asText());
 		assertEquals("true",				res.at("/query/inOrder").asText());
 		assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
 		assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
 		assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
-		assertEquals("2",					res.at("/query/distances").elements().next().at("/boundary/min").asText());
-		assertEquals("3",					res.at("/query/distances").elements().next().at("/boundary/max").asText());
+		assertEquals(2,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
+		assertEquals(3,						res.at("/query/distances").elements().next().at("/boundary/max").asInt());
 		operands = Lists.newArrayList(res.at("/query/operands").elements());
 		assertEquals("korap:token",			operands.get(0).at("/@type").asText());
 		assertEquals("der",					operands.get(0).at("/wrap/key").asText());
@@ -356,231 +347,161 @@
 		assertEquals("Mann",				operands.get(1).at("/wrap/key").asText());
 		assertEquals("lemma",				operands.get(1).at("/wrap/layer").asText());
 		assertEquals("match:eq",			operands.get(1).at("/wrap/match").asText());
+		
+		query = "[base=der][]+[base=Mann]";
+		qs.setQuery(query, "poliqarpplus");
+		res = mapper.readTree(qs.toJSON());
+		assertEquals("korap:group", 		res.at("/query/@type").asText());
+		assertEquals("operation:sequence",	res.at("/query/operation").asText());
+		assertEquals("true",				res.at("/query/inOrder").asText());
+		assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
+		assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
+		assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
+		assertEquals(2,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
+		assertEquals(true,					res.at("/query/distances").elements().next().at("/boundary/max").isMissingNode());
+		operands = Lists.newArrayList(res.at("/query/operands").elements());
+		assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+		assertEquals("der",					operands.get(0).at("/wrap/key").asText());
+		assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
+		assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
+		assertEquals("korap:token",			operands.get(1).at("/@type").asText());
+		assertEquals("Mann",				operands.get(1).at("/wrap/key").asText());
+		assertEquals("lemma",				operands.get(1).at("/wrap/layer").asText());
+		assertEquals("match:eq",			operands.get(1).at("/wrap/match").asText());
+		
+		query = "[base=der][]*[base=Mann]";
+		qs.setQuery(query, "poliqarpplus");
+		res = mapper.readTree(qs.toJSON());
+		assertEquals("korap:group", 		res.at("/query/@type").asText());
+		assertEquals("operation:sequence",	res.at("/query/operation").asText());
+		assertEquals("true",				res.at("/query/inOrder").asText());
+		assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
+		assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
+		assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
+		assertEquals(1,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
+		assertEquals(true,					res.at("/query/distances").elements().next().at("/boundary/max").isMissingNode());
+		
+		query = "[base=der][]{2,5}[base=Mann][]?[][base=Frau]";
+		qs.setQuery(query, "poliqarpplus");
+		res = mapper.readTree(qs.toJSON());
+		assertEquals("korap:group", 		res.at("/query/@type").asText());
+		assertEquals("operation:sequence",	res.at("/query/operation").asText());
+		assertEquals("true",				res.at("/query/inOrder").asText());
+		assertEquals("korap:distance",		res.at("/query/distances").elements().next().at("/@type").asText());
+		assertEquals("w",					res.at("/query/distances").elements().next().at("/key").asText());
+		assertEquals("korap:boundary",		res.at("/query/distances").elements().next().at("/boundary/@type").asText());
+		assertEquals(3,						res.at("/query/distances").elements().next().at("/boundary/min").asInt());
+		assertEquals(6,						res.at("/query/distances").elements().next().at("/boundary/max").asInt());
+		operands = Lists.newArrayList(res.at("/query/operands").elements());
+		assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+		assertEquals("der",					operands.get(0).at("/wrap/key").asText());
+		assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
+		assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
+		assertEquals("korap:group",			operands.get(1).at("/@type").asText());
+		assertEquals("operation:sequence",	operands.get(1).at("/operation").asText());
+		assertEquals("korap:distance",		operands.get(1).get("distances").elements().next().at("/@type").asText());
+		assertEquals("w",					operands.get(1).get("distances").elements().next().at("/key").asText());
+		assertEquals("korap:boundary",		operands.get(1).get("distances").elements().next().at("/boundary/@type").asText());
+		assertEquals(2,						operands.get(1).get("distances").elements().next().at("/boundary/min").asInt());
+		assertEquals(3,						operands.get(1).get("distances").elements().next().at("/boundary/max").asInt());
+		operands = Lists.newArrayList(operands.get(1).get("operands").elements());
+		assertEquals("Mann",				operands.get(0).at("/wrap/key").asText());
+		assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
+		assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
+		assertEquals("Frau",				operands.get(1).at("/wrap/key").asText());
+		assertEquals("lemma",				operands.get(1).at("/wrap/layer").asText());
+		assertEquals("match:eq",			operands.get(1).at("/wrap/match").asText());
+		
+		query = "[base=geht][base=der][]*contains(<s>,<np>)";
+		qs.setQuery(query, "poliqarpplus");
+		res = mapper.readTree(qs.toJSON());
+		assertEquals("korap:group", 		res.at("/query/@type").asText());
+		assertEquals("operation:sequence",	res.at("/query/operation").asText());
+		assertEquals(true,					res.at("/query/inOrder").isMissingNode());
+		assertEquals(true,					res.at("/query/distances").isMissingNode());
+		operands = Lists.newArrayList(res.at("/query/operands").elements());
+		assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+		assertEquals("geht",					operands.get(0).at("/wrap/key").asText());
+		assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
+		assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
+		assertEquals("korap:group",			operands.get(1).at("/@type").asText());
+		assertEquals("operation:sequence",	operands.get(1).at("/operation").asText());
+		assertEquals("korap:distance",		operands.get(1).get("distances").elements().next().at("/@type").asText());
+		assertEquals("w",					operands.get(1).get("distances").elements().next().at("/key").asText());
+		assertEquals("korap:boundary",		operands.get(1).get("distances").elements().next().at("/boundary/@type").asText());
+		assertEquals(1,						operands.get(1).get("distances").elements().next().at("/boundary/min").asInt());
+		assertEquals(true,					operands.get(1).get("distances").elements().next().at("/boundary/max").isMissingNode());
+		operands = Lists.newArrayList(operands.get(1).get("operands").elements());
+		assertEquals("der",				operands.get(0).at("/wrap/key").asText());
+		assertEquals("lemma",				operands.get(0).at("/wrap/layer").asText());
+		assertEquals("match:eq",			operands.get(0).at("/wrap/match").asText());
+		assertEquals("korap:group",			operands.get(1).at("/@type").asText());
+		assertEquals("operation:position",	operands.get(1).at("/operation").asText());
 	}
-//		
-//		// [base=der][]{2,5}[base=Mann][]?[][base=Frau]   nested distances=
-//		String et5 = 
-//				"{@type=korap:group, operation=operation:sequence," +
-//				"operands=[" +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
-//					"{@type=korap:group, operation=operation:sequence, " +
-//					"operands=[" +
-//						"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}," +
-//						"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Frau, match=match:eq}}" +
-//					"], inOrder=true, distances=[" +
-//						"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=2, max=3}, min=2, max=3}" +
-//					"]}" +
-//				"], inOrder=true, distances=[" +
-//					"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=3, max=6}, min=3, max=6}" +
-//				"]}";
-//		ppt = new PoliqarpPlusTree("[base=der][]{2,5}[base=Mann][]?[][base=Frau]");
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(et5.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		// [base=der][]*[base=Mann]
-//		String et6 = 
-//			"{@type=korap:group, operation=operation:sequence, " +
-//			"operands=[" +
-//				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
-//				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
-//			"], inOrder=true, distances=[" +
-//				"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1}, min=1}" +
-//			"]}";
-//		ppt = new PoliqarpPlusTree("[base=der][]*[base=Mann]");
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(et6.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		// [base=der][]+[base=Mann]
-//		String et7 = 
-//			"{@type=korap:group, operation=operation:sequence, " +
-//			"operands=[" +
-//				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
-//				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
-//			"], inOrder=true, distances=[" +
-//				"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=2}, min=2}" +
-//			"]}";
-//		ppt = new PoliqarpPlusTree("[base=der][]+[base=Mann]");
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(et7.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		// [base=der][]+[base=Mann]
-//		String et8 = 
-//			"{@type=korap:group, operation=operation:sequence, " +
-//			"operands=[" +
-//				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
-//				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
-//			"], inOrder=true, distances=[" +
-//				"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=2, max=103}, min=2, max=103}" +
-//			"]}";
-//		ppt = new PoliqarpPlusTree("[base=der][]{1,102}[base=Mann]");
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(et8.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		// [base=geht][base=der][]*[base=Mann]
-//		String et9 = 
-//			"{@type=korap:group, operation=operation:sequence, operands=[" +
-//				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=geht, match=match:eq}}," +
-//				"{@type=korap:group, operation=operation:sequence, " +
-//				"operands=[" +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
-//				"], inOrder=true, distances=[" +
-//					"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1}, min=1}" +
-//				"]}" +
-//			"]}";
-//		ppt = new PoliqarpPlusTree("[base=geht][base=der][]*[base=Mann]");
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(et9.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		query = "[base=geht][base=der][]*[base=Mann][base=da]";
-//		expected = 
-//			"{@type=korap:group, operation=operation:sequence, operands=[" +
-//				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=geht, match=match:eq}}," +
-//				"{@type=korap:group, operation=operation:sequence, " +
-//				"operands=[" +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
-//					"{@type=korap:group, operation=operation:sequence, operands=[" +
-//						"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}," +
-//						"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=da, match=match:eq}}" +
-//					"]}" +
-//				"], inOrder=true, distances=[" +
-//					"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1}, min=1}" +
-//				"]}" +
-//			"]}";
-//		ppt = new PoliqarpPlusTree(query);
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(expected.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		query = "[base=geht][base=der][]*contains(<s>,<np>)";
-//		expected = 
-//			"{@type=korap:group, operation=operation:sequence, operands=[" +
-//				"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=geht, match=match:eq}}," +
-//				"{@type=korap:group, operation=operation:sequence, " +
-//				"operands=[" +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
-//					"{@type=korap:group, operation=operation:position, frames=[frames:contains], operands=[" +
-//					  "{@type=korap:span, key=s}," +
-//					  "{@type=korap:span, key=np}" +
-//					"], frame=frame:contains}" +
-//				"], inOrder=true, distances=[" +
-//					"{@type=korap:distance, key=w, boundary={@type=korap:boundary, min=1}, min=1}" +
-//				"]}" +
-//			"]}";
-//		ppt = new PoliqarpPlusTree(query);
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(expected.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//	}
-//
-//	@Test
-//	public void testDistancesWithClass() throws QueryException {
-//		query = "[base=der]{1:[]}[base=Mann]";
-//		expected = 
-//				"{@type=korap:group, operation=operation:sequence, operands=[" +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
-//					"{@type=korap:group, operation=operation:class, class=1, classOut=1, operands=[" +
-//						"{@type=korap:token}" +
-//					"]}," +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
-//				"]}";
-//		ppt = new PoliqarpPlusTree(query);
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(expected.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		query = "{1:[]}[base=der][base=Mann]";
-//		expected = 
-//				"{@type=korap:group, operation=operation:sequence, operands=[" +
-//					"{@type=korap:group, operation=operation:class, class=1, classOut=1, operands=[" +
-//						"{@type=korap:token}" +
-//					"]}," +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=der, match=match:eq}}," +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
-//				"]}";
-//		ppt = new PoliqarpPlusTree(query);
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(expected.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//	}
-//	
-//	@Test
-//	public void testLeadingTrailingEmptyTokens() throws QueryException {
-//		// startswith(<s>, [][base=Mann]
-//		String et1 = 
-//			"{@type=korap:group, operation=operation:position, frames=[frames:startswith], operands=[" +	
-//				"{@type=korap:span, key=s}," +
-//				"{@type=korap:group, operation=operation:sequence, operands=[" +
-//					"{@type=korap:token}," +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
-//				"]}" +
-//			"], frame=frame:startswith}";
-//		ppt = new PoliqarpPlusTree("startswith(<s>, [][base=Mann])");
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(et1.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		query = "[][base=Mann]";
-//		expected = 
-//				"{@type=korap:group, operation=operation:sequence, operands=[" +
-//					"{@type=korap:token}," +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
-//				"]}";
-//		ppt = new PoliqarpPlusTree(query);
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(expected.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		query = "[][][base=Mann]";
-//		expected = 
-//				"{@type=korap:group, operation=operation:sequence, operands=[" +
-//					"{@type=korap:group, operation=operation:repetition, operands=[" +
-//						"{@type=korap:token}" +
-//					"], boundary={@type=korap:boundary, min=2, max=2}, min=2, max=2}," +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
-//				"]}";
-//		ppt = new PoliqarpPlusTree(query);
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(expected.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		query = "[][]*[base=Mann]";
-//		expected = 
-//				"{@type=korap:group, operation=operation:sequence, operands=[" +
-//					"{@type=korap:group, operation=operation:repetition, operands=[" +
-//						"{@type=korap:token}" +
-//					"], boundary={@type=korap:boundary, min=1}, min=1}," +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}" +
-//				"]}";
-//		ppt = new PoliqarpPlusTree(query);
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(expected.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		query = "[][]*[base=Mann][][]";
-//		expected = 
-//				"{@type=korap:group, operation=operation:sequence, operands=[" +
-//					"{@type=korap:group, operation=operation:repetition, operands=[" +
-//						"{@type=korap:token}" +
-//					"], boundary={@type=korap:boundary, min=1}, min=1}," +
-//					"{@type=korap:token, wrap={@type=korap:term, layer=lemma, key=Mann, match=match:eq}}," +
-//					"{@type=korap:group, operation=operation:repetition, operands=[" +
-//						"{@type=korap:token}" +
-//					"], boundary={@type=korap:boundary, min=2, max=2}, min=2, max=2}" +
-//				"]}";
-//		ppt = new PoliqarpPlusTree(query);
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(expected.replaceAll(" ", ""), map.replaceAll(" ", ""));
-//		
-//		query = "[][]*contains(<s>, <np>)[][]";
-//		expected = 
-//				"{@type=korap:group, operation=operation:sequence, operands=[" +
-//					"{@type=korap:group, operation=operation:repetition, operands=[" +
-//						"{@type=korap:token}" +
-//					"], boundary={@type=korap:boundary, min=1}, min=1}," +
-//					"{@type=korap:group, operation=operation:position, frames=[frames:contains], operands=[" +
-//					  "{@type=korap:span, key=s}," +
-//					  "{@type=korap:span, key=np}" +
-//					"], frame=frame:contains}," +
-//					"{@type=korap:group, operation=operation:repetition, operands=[" +
-//						"{@type=korap:token}" +
-//					"], boundary={@type=korap:boundary, min=2, max=2}, min=2, max=2}" +
-//				"]}";
-//		ppt = new PoliqarpPlusTree(query);
-//		map = ppt.getRequestMap().get("query").toString();
-//		assertEquals(expected.replaceAll(" ", ""), map.replaceAll(" ", ""));
+
+	@Test
+	public void testDistancesWithClass() throws QueryException, JsonProcessingException, IOException {
+		query = "[base=der]{[]}[base=Mann]";
+		qs.setQuery(query, "poliqarpplus");
+		res = mapper.readTree(qs.toJSON());
+		assertEquals("korap:group", 		res.at("/query/@type").asText());
+		assertEquals("operation:sequence",	res.at("/query/operation").asText());
+		assertEquals(true,					res.at("/query/inOrder").isMissingNode());
+		assertEquals(true,					res.at("/query/distances").isMissingNode());
+		operands = Lists.newArrayList(res.at("/query/operands").elements());
+		assertEquals("der",					operands.get(0).at("/wrap/key").asText());
+		assertEquals("Mann",				operands.get(2).at("/wrap/key").asText());
+		assertEquals("korap:group",			operands.get(1).at("/@type").asText());
+		assertEquals("operation:class",		operands.get(1).at("/operation").asText());
+		assertEquals(1,						operands.get(1).at("/classOut").asInt());
+		operands = Lists.newArrayList(operands.get(1).at("/operands").elements());
+		assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+		assertEquals(true,					operands.get(0).at("/wrap").isMissingNode());
+		
+		query = "[base=der]{2:[]}[base=Mann]";
+		qs.setQuery(query, "poliqarpplus");
+		res = mapper.readTree(qs.toJSON());
+		operands = Lists.newArrayList(res.at("/query/operands").elements());
+		assertEquals("operation:class",		operands.get(1).at("/operation").asText());
+		assertEquals(2,						operands.get(1).at("/classOut").asInt());
+		
+		query = "{1:[]}[base=der][base=Mann]";
+		qs.setQuery(query, "poliqarpplus");
+		res = mapper.readTree(qs.toJSON());
+		operands = Lists.newArrayList(res.at("/query/operands").elements());
+		assertEquals("operation:class",		operands.get(0).at("/operation").asText());
+		assertEquals(1,						operands.get(0).at("/classOut").asInt());
+	}
+	
+	@Test
+	public void testLeadingTrailingEmptyTokens() throws QueryException, JsonProcessingException, IOException {
+		query = "[][base=Mann]";
+		qs.setQuery(query, "poliqarpplus");
+		res = mapper.readTree(qs.toJSON());
+		operands = Lists.newArrayList(res.at("/query/operands").elements());
+		assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+		assertEquals(true,					operands.get(0).at("/key").isMissingNode());
+		
+		query = "[][][base=Mann]";
+		qs.setQuery(query, "poliqarpplus");
+		res = mapper.readTree(qs.toJSON());
+		operands = Lists.newArrayList(res.at("/query/operands").elements());
+		assertEquals("korap:group",			operands.get(0).at("/@type").asText());
+		assertEquals("operation:repetition",operands.get(0).at("/operation").asText());
+		assertEquals(2,						operands.get(0).at("/boundary/min").asInt());
+		assertEquals(2,						operands.get(0).at("/boundary/max").asInt());
+		operands = Lists.newArrayList(operands.get(0).at("/operands").elements());
+		assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+		assertEquals(true,					operands.get(0).at("/key").isMissingNode());
+		
+		query = "startswith(<s>, [][base=Mann])";
+		qs.setQuery(query, "poliqarpplus");
+		res = mapper.readTree(qs.toJSON());
+		operands = Lists.newArrayList(res.at("/query/operands"));
+		operands = Lists.newArrayList(operands.get(1).at("/operands"));
+		assertEquals("korap:token",			operands.get(0).at("/@type").asText());
+		assertEquals(true,					operands.get(0).at("/key").isMissingNode());
+	}
 //	}
 //	
 //	@Test
