diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralOperation.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralOperation.java
index 675b627..5dd557f 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralOperation.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralOperation.java
@@ -1,14 +1,16 @@
 package de.ids_mannheim.korap.query.object;
 
-/** Definition of possible operations within koral:group. 
+/**
+ * Definition of possible operations within koral:group.
+ * 
  * @author margaretha
  * 
  */
 public enum KoralOperation {
-    SEQUENCE, POSITION, DISJUNCTION, REPETITION, CLASS, MERGE, RELATION, FOCUS, EXCLUSION;
+    SEQUENCE, POSITION, DISJUNCTION, REPETITION, CLASS, MERGE, RELATION, FOCUS, EXCLUSION, HIERARCHY;
 
     @Override
-    public String toString() {
+    public String toString () {
         return "operation:" + super.toString().toLowerCase();
     }
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessor.java
index a5f269f..5757625 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/AnnisQueryProcessor.java
@@ -715,6 +715,10 @@
                     group = KoralObjectGenerator.makeGroup(KoralOperation.SEQUENCE);
                     putAllButGroupType(group, operatorGroup);
                 }
+                else if (groupType.equals("hierarchy")) {
+                    group = KoralObjectGenerator.makeGroup(KoralOperation.HIERARCHY);
+                    putAllButGroupType(group, operatorGroup);
+                }
                 else if (groupType.equals("position")) {
                     group = new HashMap<String, Object>();
                     putAllButGroupType(group, operatorGroup);
@@ -851,20 +855,22 @@
         String operator = getNodeCat(operatorNode);
         // DOMINANCE
         if (operator.equals("dominance")) {
-            relation = KoralObjectGenerator.makeRelation();
-            relation.put("groupType", "relation");
-            ParseTree qName = getFirstChildWithCat(operatorNode, "qName");
+//            relation = KoralObjectGenerator.makeRelation();
+            relation = new HashMap<String, Object>();
+            relation.put("groupType", "hierarchy");
+//            ParseTree qName = getFirstChildWithCat(operatorNode, "qName");
             ParseTree edgeSpecNode = getFirstChildWithCat(operatorNode,
                     "edgeSpec");
             ParseTree star = getFirstChildWithCat(operatorNode, "*");
             ParseTree rangeSpec = getFirstChildWithCat(operatorNode,
                     "rangeSpec");
-            Map<String, Object> term = KoralObjectGenerator
-                    .makeTerm();
-            term.put("layer", "c");
-            if (qName != null)
-                term = parseQNameNode(qName);
+            
+//            term.put("layer", "c");
+//            if (qName != null)
+//                term = parseQNameNode(qName);
             if (edgeSpecNode != null) {
+                Map<String, Object> term = KoralObjectGenerator
+                        .makeTerm();
                 Map<String, Object> edgeSpec = parseEdgeSpec(edgeSpecNode);
                 String edgeSpecType = (String) edgeSpec.get("@type");
                 if (edgeSpecType.equals("koral:termGroup")) {
@@ -872,22 +878,23 @@
                     term = edgeSpec;
                 }
                 else {
-                    term = KoralObjectGenerator.makeTermGroup(KoralTermGroupRelation.AND);
-                    ArrayList<Object> termGroupOperands = (ArrayList<Object>) term
-                            .get("operands");
-                    termGroupOperands.add(edgeSpec);
-                    Map<String, Object> constTerm = KoralObjectGenerator
-                            .makeTerm();
-                    constTerm.put("layer", "c");
-                    termGroupOperands.add(constTerm);
+                    term = edgeSpec;
+//                    term = KoralObjectGenerator.makeTermGroup(KoralTermGroupRelation.AND);
+//                    ArrayList<Object> termGroupOperands = (ArrayList<Object>) term
+//                            .get("operands");
+//                    termGroupOperands.add(edgeSpec);
+//                    Map<String, Object> constTerm = KoralObjectGenerator
+//                            .makeTerm();
+//                    constTerm.put("layer", "c");
+//                    termGroupOperands.add(constTerm);
                 }
+                relation.put("label", term);
             }
             if (star != null)
                 relation.put("boundary",
                         KoralObjectGenerator.makeBoundary(0, null));
             if (rangeSpec != null)
                 relation.put("boundary", boundaryFromRangeSpec(rangeSpec));
-            relation.put("wrap", term);
         }
         else if (operator.equals("pointing")) {
             relation = KoralObjectGenerator.makeRelation();
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralObjectGenerator.java b/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralObjectGenerator.java
index 6949812..0222864 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralObjectGenerator.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralObjectGenerator.java
@@ -182,8 +182,7 @@
         group.put("@type", KoralType.RELATION.toString());
         return group;
     }
-
-
+    
     public static Map<String, Object> makeBoundary (Integer min,
             Integer max) {
         Map<String, Object> group = new HashMap<String, Object>();
diff --git a/src/test/java/de/ids_mannheim/korap/query/test/annis/AnnisQueryProcessorTest.java b/src/test/java/de/ids_mannheim/korap/query/test/annis/AnnisQueryProcessorTest.java
index 066e615..effe058 100644
--- a/src/test/java/de/ids_mannheim/korap/query/test/annis/AnnisQueryProcessorTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/test/annis/AnnisQueryProcessorTest.java
@@ -149,7 +149,7 @@
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
         assertEquals("operation:position", res.at("/query/operation").asText());
-        assertEquals("operation:relation", res
+        assertEquals("operation:hierarchy", res
                 .at("/query/operands/0/operation").asText());
         assertEquals("frames:startsWith", res.at("/query/frames/0").asText());
         assertEquals("koral:span", res.at("/query/operands/0/operands/0/@type")
@@ -180,7 +180,7 @@
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
         assertEquals("operation:position", res.at("/query/operation").asText());
-        assertEquals("operation:relation", res
+        assertEquals("operation:hierarchy", res
                 .at("/query/operands/0/operation").asText());
         assertEquals("frames:endsWith", res.at("/query/frames/0").asText());
         assertEquals("koral:span", res.at("/query/operands/0/operands/0/@type")
@@ -392,7 +392,7 @@
                 .asText());
         assertEquals("koral:group", res
                 .at("/query/operands/0/operands/0/@type").asText());
-        assertEquals("operation:relation",
+        assertEquals("operation:hierarchy",
                 res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals("koral:reference",
                 res.at("/query/operands/0/operands/0/operands/0/@type")
@@ -438,7 +438,7 @@
                 .asText());
         assertEquals("koral:group", res
                 .at("/query/operands/0/operands/0/@type").asText());
-        assertEquals("operation:relation",
+        assertEquals("operation:hierarchy",
                 res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals("koral:reference",
                 res.at("/query/operands/0/operands/0/operands/0/@type")
@@ -504,7 +504,7 @@
         assertEquals(129, res.at("/query/operands/0/classRef/0").asInt());
         assertEquals("koral:group", res
                 .at("/query/operands/0/operands/0/@type").asText());
-        assertEquals("operation:relation",
+        assertEquals("operation:hierarchy",
                 res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals("koral:token",
                 res.at("/query/operands/0/operands/0/operands/0/@type")
@@ -542,7 +542,7 @@
         assertEquals(129, res.at("/query/operands/0/classRef/0").asInt());
         assertEquals("koral:group", res
                 .at("/query/operands/0/operands/0/@type").asText());
-        assertEquals("operation:relation",
+        assertEquals("operation:hierarchy",
                 res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals("koral:token",
                 res.at("/query/operands/0/operands/0/operands/0/@type")
@@ -572,7 +572,7 @@
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
         assertEquals("koral:group", res.at("/query/@type").asText());
-        assertEquals("operation:relation", res.at("/query/operation").asText());
+        assertEquals("operation:hierarchy", res.at("/query/operation").asText());
         assertEquals("koral:reference", res.at("/query/operands/0/@type")
                 .asText());
         assertEquals("operation:focus", res.at("/query/operands/0/operation")
@@ -648,7 +648,7 @@
         assertEquals(129, res.at("/query/operands/0/classRef/0").asInt());
         assertEquals("koral:group", res
                 .at("/query/operands/0/operands/0/@type").asText());
-        assertEquals("operation:relation",
+        assertEquals("operation:hierarchy",
                 res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals("operation:class",
                 res.at("/query/operands/0/operands/0/operands/0/operation")
@@ -859,11 +859,11 @@
         query = "pos=\"N\" & pos=\"V\" & pos=\"P\" & #1 > #2 & #1 > #3";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        assertEquals("operation:relation", res.at("/query/operation").asText());
+        assertEquals("operation:hierarchy", res.at("/query/operation").asText());
         assertEquals("operation:focus", res.at("/query/operands/0/operation")
                 .asText());
         assertEquals(129, res.at("/query/operands/0/classRef/0").asInt());
-        assertEquals("operation:relation",
+        assertEquals("operation:hierarchy",
                 res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals("operation:class",
                 res.at("/query/operands/0/operands/0/operands/0/operation")
@@ -887,7 +887,7 @@
         assertEquals("operation:focus", res.at("/query/operands/0/operation")
                 .asText());
         assertEquals(130, res.at("/query/operands/0/classRef/0").asInt());
-        assertEquals("operation:relation",
+        assertEquals("operation:hierarchy",
                 res.at("/query/operands/0/operands/0/operation").asText());
         assertEquals("operation:focus",
                 res.at("/query/operands/0/operands/0/operands/0/operation")
@@ -896,7 +896,7 @@
                 res.at("/query/operands/0/operands/0/operands/0/classRef/0")
                         .asInt());
         assertEquals(
-                "operation:relation",
+                "operation:hierarchy",
                 res.at("/query/operands/0/operands/0/operands/0/operands/0/operation")
                         .asText());
         assertEquals(
@@ -998,7 +998,7 @@
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
         assertEquals("koral:group", res.at("/query/@type").asText());
-        assertEquals("operation:relation", res.at("/query/operation").asText());
+        assertEquals("operation:hierarchy", res.at("/query/operation").asText());
         assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
         assertEquals("cnx", res.at("/query/operands/0/foundry").asText());
         assertEquals("c", res.at("/query/operands/0/layer").asText());
diff --git a/src/test/java/de/ids_mannheim/korap/query/test/annis/DominanceTests.java b/src/test/java/de/ids_mannheim/korap/query/test/annis/DominanceTests.java
index b36f6e4..ca8bce1 100644
--- a/src/test/java/de/ids_mannheim/korap/query/test/annis/DominanceTests.java
+++ b/src/test/java/de/ids_mannheim/korap/query/test/annis/DominanceTests.java
@@ -1,6 +1,7 @@
 package de.ids_mannheim.korap.query.test.annis;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 
@@ -12,261 +13,360 @@
 
 import de.ids_mannheim.korap.query.serialize.QuerySerializer;
 
+/**
+ * @author bingl, margaretha
+ *
+ */
 public class DominanceTests {
     private String query;
     private QuerySerializer qs = new QuerySerializer();
     private ObjectMapper mapper = new ObjectMapper();
     private JsonNode res;
 
+
     @Test
     public void testDominanceWithArbitrarySpans ()
             throws JsonProcessingException, IOException {
         query = "node > node";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-        //        assertEquals("koral:group", res.at("/query/@type").asText());
-        //        assertEquals("operation:relation", res.at("/query/operation").asText());
-        //        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
-        //        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
-        //        assertEquals("koral:relation", res.at("/query/relation/@type").asText());
-        //        assertEquals("koral:term", res.at("/query/relation/wrap/@type")
-        //                .asText());
-        //        assertEquals("c", res.at("/query/relation/wrap/layer").asText());
+        assertEquals("koral:group", res.at("/query/@type").asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operation").asText());
+        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
     }
 
 
     @Test
-    public void testDominanceWithAnnotation1 ()
-            throws JsonProcessingException, IOException {
-        query = "node > cnx/c=\"np\"";
-        qs.setQuery(query, "annis");
-        res = mapper.readTree(qs.toJSON());
-        //        assertEquals("koral:group", res.at("/query/@type").asText());
-        //        assertEquals("operation:relation", res.at("/query/operation").asText());
-        //        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
-        //        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
-        //        assertEquals("np", res.at("/query/operands/1/key").asText());
-        //        assertEquals("c", res.at("/query/operands/1/layer").asText());
-        //        assertEquals("cnx", res.at("/query/operands/1/foundry").asText());
-        //        assertEquals("koral:relation", res.at("/query/relation/@type").asText());
-        //        assertEquals("koral:term", res.at("/query/relation/wrap/@type")
-        //                .asText());
-        //        assertEquals("c", res.at("/query/relation/wrap/layer").asText());
-    }
-
-
-    @Test
-    public void testDominanceWithAnnotation2 ()
+    public void testDominanceWithAnnotationOnFirstOperand ()
             throws JsonProcessingException, IOException {
         query = "cnx/c=\"np\" > node";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-    }
-    
-    @Test
-    public void testDominanceWithReference ()
-            throws JsonProcessingException, IOException {
-        query = "cat=/NP/ & cat=/PP/ > #1";
-        qs.setQuery(query, "annis");
-        res = mapper.readTree(qs.toJSON());
+        assertEquals("koral:group", res.at("/query/@type").asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operation").asText());
+        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
+        assertEquals("np", res.at("/query/operands/0/key").asText());
+        assertEquals("c", res.at("/query/operands/0/layer").asText());
+        assertEquals("cnx", res.at("/query/operands/0/foundry").asText());
+        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
     }
 
+
     @Test
-    public void testDominanceWithReference2 () throws JsonProcessingException,
-            IOException {
+    public void testDominanceWithAnnotationOnSecondOperand ()
+            throws JsonProcessingException, IOException {
+        query = "node > cnx/c=\"np\"";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+        assertEquals("koral:group", res.at("/query/@type").asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operation").asText());
+        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
+        assertEquals("np", res.at("/query/operands/1/key").asText());
+        assertEquals("c", res.at("/query/operands/1/layer").asText());
+        assertEquals("cnx", res.at("/query/operands/1/foundry").asText());
+    }
+
+
+    @Test
+    public void testDominanceWithAnnotatedReferences ()
+            throws JsonProcessingException, IOException {
+        // cat=PP is a shorcut for const:cat="PP"
+        query = "cat=\"NP\" & cat=\"PP\" > #1";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+        assertEquals("koral:group", res.at("/query/@type").asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operation").asText());
+        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
+        assertEquals("PP", res.at("/query/operands/0/key").asText());
+        assertEquals("c", res.at("/query/operands/0/layer").asText());
+        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
+        assertEquals("NP", res.at("/query/operands/1/key").asText());
+        assertEquals("c", res.at("/query/operands/1/layer").asText());
+    }
+
+
+    @Test
+    public void testDominanceWithAbritraryReferences ()
+            throws JsonProcessingException, IOException {
         query = "node & node & #2 > #1";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-//        assertEquals("koral:group", res.at("/query/@type").asText());
-//        assertEquals("operation:relation", res.at("/query/operation").asText());
-//        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
-//        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
-//        assertEquals("koral:relation", res.at("/query/relation/@type").asText());
-//        assertEquals("koral:term", res.at("/query/relation/wrap/@type")
-//                .asText());
-//        assertEquals("c", res.at("/query/relation/wrap/layer").asText());
+        assertEquals("koral:group", res.at("/query/@type").asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operation").asText());
+        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
     }
-    
+
+
     @Test
     public void testDominanceWithToken ()
             throws JsonProcessingException, IOException {
         query = "\"Mann\" & node & #2 > #1";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-//        assertEquals("koral:group", res.at("/query/@type").asText());
-//        assertEquals("operation:relation", res.at("/query/operation").asText());
-//        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
-//        assertEquals("koral:token", res.at("/query/operands/1/@type").asText());
-//        assertEquals("Mann", res.at("/query/operands/1/wrap/key").asText());
-//        assertEquals("koral:relation", res.at("/query/relation/@type").asText());
-//        assertEquals("koral:term", res.at("/query/relation/wrap/@type")
-//                .asText());
-//        assertEquals("c", res.at("/query/relation/wrap/layer").asText());
+        assertEquals("koral:group", res.at("/query/@type").asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operation").asText());
+        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:token", res.at("/query/operands/1/@type").asText());
+        assertEquals("Mann", res.at("/query/operands/1/wrap/key").asText());
     }
-       
-    
+
+
     @Test
-    public void testDominanceFollowedByAnnotations () throws JsonProcessingException,
-            IOException {
+    public void testDominanceFollowedByAnnotations ()
+            throws JsonProcessingException, IOException {
         query = "#1 > #2 & cnx/cat=\"vp\" & cnx/cat=\"np\"";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-//        assertEquals("koral:group", res.at("/query/@type").asText());
-//        assertEquals("operation:relation", res.at("/query/operation").asText());
-//        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
-//        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
-//        assertEquals("vp", res.at("/query/operands/0/key").asText());
-//        assertEquals("c", res.at("/query/operands/0/layer").asText());
-//        assertEquals("cnx", res.at("/query/operands/0/foundry").asText());
-//        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
-//        assertEquals("np", res.at("/query/operands/1/key").asText());
-//        assertEquals("c", res.at("/query/operands/1/layer").asText());
-//        assertEquals("cnx", res.at("/query/operands/1/foundry").asText());
-//        assertEquals("koral:relation", res.at("/query/relation/@type").asText());
-//        assertEquals("koral:term", res.at("/query/relation/wrap/@type")
-//                .asText());
-//        assertEquals("c", res.at("/query/relation/wrap/layer").asText());
+        assertEquals("koral:group", res.at("/query/@type").asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operation").asText());
+        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
+        assertEquals("vp", res.at("/query/operands/0/key").asText());
+        assertEquals("c", res.at("/query/operands/0/layer").asText());
+        assertEquals("cnx", res.at("/query/operands/0/foundry").asText());
+        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
+        assertEquals("np", res.at("/query/operands/1/key").asText());
+        assertEquals("c", res.at("/query/operands/1/layer").asText());
+        assertEquals("cnx", res.at("/query/operands/1/foundry").asText());
     }
-   
+
+
     @Test
-    public void testIndirectDominance () throws JsonProcessingException,
-            IOException {
+    public void testIndirectDominance ()
+            throws JsonProcessingException, IOException {
         query = "node & node & #1 >2,4 #2";
         qs.setQuery(query, "annis");
-//        res = mapper.readTree(qs.toJSON());
-//        assertEquals("koral:group", res.at("/query/@type").asText());
-//        assertEquals("operation:relation", res.at("/query/operation").asText());
-//        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
-//        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
-//        assertEquals("koral:relation", res.at("/query/relation/@type").asText());
-//        assertEquals(2, res.at("/query/relation/boundary/min").asInt());
-//        assertEquals(4, res.at("/query/relation/boundary/max").asInt());
-//        assertEquals("koral:term", res.at("/query/relation/wrap/@type")
-//                .asText());
-//        assertEquals("c", res.at("/query/relation/wrap/layer").asText());
+        res = mapper.readTree(qs.toJSON());
+        System.out.println(res.asText());
+        assertEquals("koral:group", res.at("/query/@type").asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operation").asText());
+        assertEquals("koral:span", res.at("/query/operands/0/@type").asText());
+        assertEquals("koral:span", res.at("/query/operands/1/@type").asText());
+        assertEquals(2, res.at("/query/boundary/min").asInt());
+        assertEquals(4, res.at("/query/boundary/max").asInt());
+        assertTrue(res.at("/query/label").isMissingNode());
 
         query = "node & node & #1 >* #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-//        assertEquals(0, res.at("/query/relation/boundary/min").asInt());
-//        assertEquals(true, res.at("/query/relation/boundary/max")
-//                .isMissingNode());
+        assertEquals(0, res.at("/query/boundary/min").asInt());
+        assertTrue(res.at("/query/boundary/max").isMissingNode());
     }
 
-    
+
     @Test
     public void testDominanceWithType ()
             throws JsonProcessingException, IOException {
-        query = "\"Mann\" & node & #2 >[func=\"SB\"] #1";  //coordinates the func=SB term and requires a "c"-layer term (consituency relation/dominance)
+        query = "\"Mann\" & node & #2 >[func=\"SBJ\"] #1";
+        //coordinates the func=SB term and requires a "c"-layer term (consituency relation/dominance)
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
-//        assertEquals("koral:relation", res.at("/query/relation/@type").asText());
-//        assertEquals("koral:termGroup", res.at("/query/relation/wrap/@type")
-//                .asText());
-//        assertEquals("relation:and", res.at("/query/relation/wrap/relation")
-//                .asText());
-//        assertEquals("c", res.at("/query/relation/wrap/operands/1/layer")
-//                .asText());
-//        assertEquals("func", res.at("/query/relation/wrap/operands/0/layer")
-//                .asText());
-//        assertEquals("SB", res.at("/query/relation/wrap/operands/0/key")
-//                .asText());
+        //        System.out.println(res.asText());
+        //        assertEquals("koral:relation",
+        //                res.at("/query/relation/@type").asText());
+        //        assertEquals("koral:termGroup",
+        //                res.at("/query/relation/wrap/@type").asText());
+        //        assertEquals("relation:and",
+        //                res.at("/query/relation/wrap/relation").asText());
+        //        assertEquals("c", 
+        //                res.at("/query/relation/wrap/operands/1/layer").asText());
+        //        assertEquals("func",
+        //                res.at("/query/relation/wrap/operands/0/layer").asText());
+        //        assertEquals("SB",
+        //                res.at("/query/relation/wrap/operands/0/key").asText());
+
+        //        {
+        //            "@context": "http://korap.ids-mannheim.de/ns/koral/0.3/context.jsonld",
+        //            "query": {
+        //                "operation": "operation:hierarchy",
+        //                "operands": [
+        //                    {"@type": "koral:span"},
+        //                    {
+        //                        "wrap": {
+        //                            "@type": "koral:term",
+        //                            "layer": "orth",
+        //                            "match": "match:eq",
+        //                            "key": "Mann"
+        //                        },
+        //                        "@type": "koral:token"
+        //                    }
+        //                ],
+        //                "@type": "koral:group",
+        //                "label": {
+        //                    "@type": "koral:term",
+        //                    "layer": "c",
+        //                    "match": "match:eq",
+        //                    "key": "SBJ"
+        //                }
+        //            }
+        //        }
     }
-    
+
+
     @Test
     public void testDominanceWithMultipleTypes ()
             throws JsonProcessingException, IOException {
         query = "corenlp/c=\"VP\" & corenlp/c=\"NP\" & #1 >[malt/d=\"PP\" malt/d=\"PN\"] #2";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
+        System.out.println(res.asText());
+
+        //      {
+        //          "@context": "http://korap.ids-mannheim.de/ns/koral/0.3/context.jsonld",
+        //          "query": {
+        //              "operation": "operation:hierarchy",
+        //              "operands": [
+        //                  {
+        //                      "@type": "koral:span",
+        //                      "layer": "c",
+        //                      "foundry": "corenlp",
+        //                      "match": "match:eq",
+        //                      "key": "VP"
+        //                  },
+        //                  {
+        //                      "@type": "koral:span",
+        //                      "layer": "c",
+        //                      "foundry": "corenlp",
+        //                      "match": "match:eq",
+        //                      "key": "NP"
+        //                  }
+        //              ],
+        //              "@type": "koral:group",
+        //              "label": {
+        //                  "operands": [
+        //                      {
+        //                          "@type": "koral:term",
+        //                          "layer": "d",
+        //                          "foundry": "malt",
+        //                          "match": "match:eq",
+        //                          "key": "PP"
+        //                      },
+        //                      {
+        //                          "@type": "koral:term",
+        //                          "layer": "d",
+        //                          "foundry": "malt",
+        //                          "match": "match:eq",
+        //                          "key": "PN"
+        //                      },
+        //                      {"@type": "koral:term"}
+        //                  ],
+        //                  "@type": "koral:termGroup",
+        //                  "relation": "relation:and"
+        //              }
+        //          }
+        //      }
     }
-    
+
+
     @Test
-    public void testMultipleDominance () throws JsonProcessingException,
-            IOException {
+    public void testMultipleDominance ()
+            throws JsonProcessingException, IOException {
         query = "cat=\"CP\" & cat=\"VP\" & cat=\"NP\" & #1 > #2 > #3";
         qs.setQuery(query, "annis");
         res = mapper.readTree(qs.toJSON());
+        //        System.out.println(res.asText());
         assertEquals("koral:group", res.at("/query/@type").asText());
-        assertEquals("operation:relation", res.at("/query/operation").asText());
-        assertEquals("koral:reference", res.at("/query/operands/0/@type")
-                .asText());
-        assertEquals("operation:focus", res.at("/query/operands/0/operation")
-                .asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operation").asText());
+        assertEquals("koral:reference",
+                res.at("/query/operands/0/@type").asText());
+        assertEquals("operation:focus",
+                res.at("/query/operands/0/operation").asText());
         assertEquals(129, res.at("/query/operands/0/classRef/0").asInt());
-        assertEquals("koral:group", res
-                .at("/query/operands/0/operands/0/@type").asText());
-        assertEquals("operation:relation",
-                res.at("/query/operands/0/operands/0/operation").asText());
-        assertEquals("koral:relation",
-                res.at("/query/operands/0/operands/0/relation/@type").asText());
-        assertEquals("c",
-                res.at("/query/operands/0/operands/0/relation/wrap/layer")
-                        .asText());
-        assertEquals("koral:span",
-                res.at("/query/operands/0/operands/0/operands/0/@type")
-                        .asText());
-        assertEquals("c",
-                res.at("/query/operands/0/operands/0/operands/0/layer")
-                        .asText());
-        assertEquals("CP", res
-                .at("/query/operands/0/operands/0/operands/0/key").asText());
+
         assertEquals("koral:group",
-                res.at("/query/operands/0/operands/0/operands/1/@type")
-                        .asText());
+                res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operands/0/operands/0/operation").asText());
+        assertEquals("koral:span", res
+                .at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals("c", res
+                .at("/query/operands/0/operands/0/operands/0/layer").asText());
+        assertEquals("CP",
+                res.at("/query/operands/0/operands/0/operands/0/key").asText());
+        assertEquals("koral:group", res
+                .at("/query/operands/0/operands/0/operands/1/@type").asText());
         assertEquals("operation:class",
                 res.at("/query/operands/0/operands/0/operands/1/operation")
                         .asText());
         assertEquals(129,
                 res.at("/query/operands/0/operands/0/operands/1/classOut")
                         .asInt());
-        assertEquals(
-                "VP",
+        assertEquals("VP",
                 res.at("/query/operands/0/operands/0/operands/1/operands/0/key")
                         .asText());
     }
 
-    //      query = "cat=\"CP\" & cat=\"VP\" & cat=\"NP\" & #1 > #2 > #3";
-    //      String dom1 = 
-    //              "{@type=koral:group, operation=operation:relation, operands=[" +
-    //                      "{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //                          "{@type=koral:group, operation=operation:relation, operands=[" +
-    //                              "{@type=koral:span, layer=cat, key=CP, match=match:eq}," +
-    //                              "{@type=koral:group, operation=operation:class, class=1, classOut=1, operands=[" +
-    //                                  "{@type=koral:span, layer=cat, key=VP, match=match:eq}" +
-    //                              "]}" +
-    //                          "], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}}" +
-    //                      "]}," +
-    //                      "{@type=koral:span, layer=cat, key=NP, match=match:eq}" +
-    //              "], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}" +
-    //              "}";
-    //      aqlt = new AqlTree(query);
-    //      map = aqlt.getRequestMap().get("query").toString();
-    //      assertEquals(dom1.replaceAll(" ", ""), map.replaceAll(" ", ""));
-    //      
-    //      query = "cat=\"CP\" & cat=\"VP\" & cat=\"NP\" & cat=\"DP\" & #1 > #2 > #3 > #4";
-    //      String dom2 = 
-    //              "{@type=koral:group, operation=operation:relation, operands=[" +
-    //                      "{@type=koral:reference, operation=operation:focus, classRef=[1], operands=[" +
-    //                          "{@type=koral:group, operation=operation:relation, operands=[" +
-    //                              "{@type=koral:reference, operation=operation:focus, classRef=[0], operands=[" +
-    //                                  "{@type=koral:group, operation=operation:relation, operands=[" +
-    //                                      "{@type=koral:span, layer=cat, key=CP, match=match:eq}," +
-    //                                      "{@type=koral:group, operation=operation:class, class=1, classOut=1, operands=[" +
-    //                                          "{@type=koral:span, layer=cat, key=VP, match=match:eq}" +
-    //                                      "]}" +
-    //                                  "], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}}" +
-    //                              "]}," +
-    //                              "{@type=koral:group, operation=operation:class, class=2, classOut=2, operands=[" +
-    //                                  "{@type=koral:span, layer=cat, key=NP, match=match:eq}" +
-    //                              "]}" +
-    //                          "], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}}" +
-    //                      "]}," +
-    //                      "{@type=koral:span, layer=cat, key=DP, match=match:eq}" +
-    //                  "], relation={@type=koral:relation, wrap={@type=koral:term, layer=c}}" +
-    //              "}";
-    //      aqlt = new AqlTree(query);
-    //      map = aqlt.getRequestMap().get("query").toString();
-    //      assertEquals(dom2.replaceAll(" ", ""), map.replaceAll(" ", ""));
-    //  }
+
+    @Test
+    public void testMultipleDominance2 ()
+            throws JsonProcessingException, IOException {
+        query = "cat=\"CP\" & cat=\"VP\" & cat=\"NP\" & cat=\"DP\" & #1 > #2 > #3 > #4";
+        qs.setQuery(query, "annis");
+        res = mapper.readTree(qs.toJSON());
+        System.out.println(res.asText());
+
+        assertEquals("koral:group", res.at("/query/@type").asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operation").asText());
+        assertEquals("koral:reference",
+                res.at("/query/operands/0/@type").asText());
+        assertEquals("operation:focus",
+                res.at("/query/operands/0/operation").asText());
+        assertEquals(130, res.at("/query/operands/0/classRef/0").asInt());
+
+        assertEquals("c", res.at("/query/operands/1/layer").asText());
+        assertEquals("DP", res.at("/query/operands/1/key").asText());
+
+        assertEquals("koral:group",
+                res.at("/query/operands/0/operands/0/@type").asText());
+        assertEquals("operation:hierarchy",
+                res.at("/query/operands/0/operands/0/operation").asText());
+        assertEquals("koral:reference", res
+                .at("/query/operands/0/operands/0/operands/0/@type").asText());
+        assertEquals(129,
+                res.at("/query/operands/0/operands/0/operands/0/classRef/0")
+                        .asInt());
+
+        assertEquals("operation:class",
+                res.at("/query/operands/0/operands/0/operands/1/operation")
+                        .asText());
+        assertEquals(130,
+                res.at("/query/operands/0/operands/0/operands/1/classOut")
+                        .asInt());
+        assertEquals("NP",
+                res.at("/query/operands/0/operands/0/operands/1/operands/0/key")
+                        .asText());
+
+        assertEquals("c",
+                res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/0/layer")
+                        .asText());
+        assertEquals("CP",
+                res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/0/key")
+                        .asText());
+        assertEquals("koral:group",
+                res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/1/@type")
+                        .asText());
+        assertEquals("operation:class",
+                res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/1/operation")
+                        .asText());
+        assertEquals(129,
+                res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/1/classOut")
+                        .asInt());
+        assertEquals("VP",
+                res.at("/query/operands/0/operands/0/operands/0/operands/0/operands/1/operands/0/key")
+                        .asText());
+
+    }
 }
diff --git a/src/test/java/de/ids_mannheim/korap/query/test/annis/RelationTests.java b/src/test/java/de/ids_mannheim/korap/query/test/annis/RelationTests.java
index 053edc2..33658d7 100644
--- a/src/test/java/de/ids_mannheim/korap/query/test/annis/RelationTests.java
+++ b/src/test/java/de/ids_mannheim/korap/query/test/annis/RelationTests.java
@@ -2,7 +2,6 @@
 
 import java.io.IOException;
 
-import org.junit.BeforeClass;
 import org.junit.Test;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
