diff --git a/src/main/java/de/ids_mannheim/korap/KorapQuery.java b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
index 2e8d299..b7c3fcc 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
@@ -1,23 +1,32 @@
 package de.ids_mannheim.korap;
 
-import de.ids_mannheim.korap.query.wrap.*;
-import de.ids_mannheim.korap.response.Notifications;
-import de.ids_mannheim.korap.util.QueryException;
+import java.io.IOException;
 
-import org.apache.lucene.search.spans.SpanQuery;
 import org.apache.lucene.util.automaton.RegExp;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.JsonNode;
-
-import de.ids_mannheim.korap.query.SpanWithinQuery;
-
-import java.util.*;
-import java.io.*;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import de.ids_mannheim.korap.query.SpanWithinQuery;
+import de.ids_mannheim.korap.query.wrap.SpanAlterQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanAttributeQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanClassQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanElementQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanMatchModifyQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanRegexQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanRepetitionQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanSegmentQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanSequenceQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanSimpleQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanSubspanQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanWildcardQueryWrapper;
+import de.ids_mannheim.korap.query.wrap.SpanWithinQueryWrapper;
+import de.ids_mannheim.korap.response.Notifications;
+import de.ids_mannheim.korap.util.QueryException;
+
 /*
   Todo: All queries with a final right expansion
   der alte []
@@ -835,6 +844,10 @@
             case "const":
                 layer = "c";
                 break;
+
+                case "cat":
+                    layer = "c";
+                    break;
             };
 
             if (isCaseInsensitive && isTerm) {
@@ -881,16 +894,52 @@
         if (isTerm)
             return this.seg(value.toString());
 
-        // Attributes currently not supported
-        if (json.has("attr"))
-            this.addWarning(
-              768,
-              "Attributes are currently not supported - results may not be correct"
-            );
+        if (json.has("attr")) {
 
+            this.addWarning(
+                    768,
+                    "Attributes are currently not supported - results may not be correct");
+
+            // SpanQueryWrapper attrQueryWrapper =
+            // handleAttr(json.get("attr"));
+            // if (attrQueryWrapper != null) {
+            // return seg SpanElementWithAttributeQueryWrapper
+            // }
+        }
         return this.tag(value.toString());
     };
 
+    private SpanQueryWrapper handleAttr(JsonNode attrNode)
+            throws QueryException {
+
+        if (!attrNode.has("@type")) {
+            throw new QueryException(701,
+                    "JSON-LD group has no @type attribute");
+        }
+
+        if (attrNode.get("@type").asText().equals("korap:term")) {
+            if (attrNode.has("tokenarity") || attrNode.has("arity")) {
+                this.addWarning(
+                        768,
+                        "This kind of attributes are currently not supported - results may not be correct");
+            }
+            if (attrNode.has("root")) {
+                String rootValue = attrNode.get("root").asText();
+                if (rootValue.equals("true") || rootValue.equals("false")) {
+                    return new SpanAttributeQueryWrapper(
+                            new SpanSimpleQueryWrapper("tokens", "@root"),
+                            Boolean.valueOf(rootValue));
+                }
+                // wrong root value
+            }
+        }
+        // else if termnode
+        else {
+            this.addWarning(715, "Attribute type is not supported");
+        }
+
+        return null;
+    }
 
     /**
      * Create a query object based on a regular expression.
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAttributeQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAttributeQueryWrapper.java
new file mode 100644
index 0000000..c21a968
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanAttributeQueryWrapper.java
@@ -0,0 +1,31 @@
+package de.ids_mannheim.korap.query.wrap;
+
+import org.apache.lucene.search.spans.SpanQuery;
+import org.apache.lucene.search.spans.SpanTermQuery;
+
+import de.ids_mannheim.korap.query.SpanAttributeQuery;
+import de.ids_mannheim.korap.util.QueryException;
+
+public class SpanAttributeQueryWrapper extends SpanQueryWrapper {
+
+    boolean isNegation = false;
+    private SpanQueryWrapper subquery;
+
+    public SpanAttributeQueryWrapper (SpanQueryWrapper sqw, boolean inclusion) {
+        this.subquery = sqw;
+        if (!inclusion) {
+            this.isNegation = true;
+        }
+    }
+
+    @Override
+    public SpanQuery toQuery() throws QueryException {
+
+        SpanQuery sq = subquery.toQuery();
+        if (sq instanceof SpanTermQuery) {
+            return new SpanAttributeQuery((SpanTermQuery) sq, isNegation, true);
+        }
+
+        return null; // or exception??
+    }
+}
