diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/JsonGenerator.java b/src/main/java/de/ids_mannheim/korap/query/serialize/JsonGenerator.java
index 61f388b..9c7677b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/JsonGenerator.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/JsonGenerator.java
@@ -3,6 +3,7 @@
 import com.fasterxml.jackson.core.JsonGenerationException;
 import com.fasterxml.jackson.databind.JsonMappingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
 import java.io.IOException;
@@ -17,6 +18,8 @@
     ObjectMapper mapper;
     AbstractSyntaxTree ast;
     private Serializer serializer;
+    private org.slf4j.Logger log = LoggerFactory
+            .getLogger(JsonGenerator.class);
 
     public JsonGenerator() {
         mapper = new ObjectMapper();
@@ -35,7 +38,7 @@
         String[] queries;
         if (args.length == 0) {
             queries = new String[]{
-					/*
+                    /*
 					 * negation
 					 * elemente
 					 * within
@@ -110,24 +113,27 @@
         mapper.writeValue(new File(outFile), requestMap);
     }
 
-    public String run(String query, String ql, List<String> meta,
+    public String run(String query, String ql, List<String> parents,
                       String cli, String cri, int cls, int crs, int page, int num) {
-        if (ql.equals("poliqarp")) {
+        if (ql.toLowerCase().equals("poliqarp")) {
             ast = new PoliqarpPlusTree(query);
 //		} else if (queryLanguage.equals("cosmas")) {
 //			ast = new CosmasTree(query);
-        } else if (ql.equals("poliqarpplus")) {
+        } else if (ql.toLowerCase().equals("poliqarpplus")) {
             ast = new PoliqarpPlusTree(query);
         } else {
             throw new IllegalArgumentException(ql + " is not a supported query language!");
         }
         Map<String, Object> requestMap = ast.getRequestMap();
         try {
-            List<Map> meta_re = serializer.serializeResources(meta);
+            List<Map> meta_re = serializer.serializeResources(parents);
+
+
             requestMap.put("meta", meta_re);
             requestMap = serializer.addParameters(requestMap, page, num,
                     cli, cri, cls, crs);
-            return mapper.writeValueAsString(requestMap);
+            String res = mapper.writeValueAsString(requestMap);
+            return res;
         } catch (IOException e) {
             e.printStackTrace();
             return null;
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/MetaCollectionSerializer.java b/src/main/java/de/ids_mannheim/korap/query/serialize/MetaCollectionSerializer.java
index 0482480..8655288 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/MetaCollectionSerializer.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/MetaCollectionSerializer.java
@@ -104,8 +104,6 @@
             Map re = types.mapify(query);
             parids.add(re);
         }
-//        metas.put("meta", parids);
-//        return mapper.writeValueAsString(metas);
         return parids;
     }
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/Serializer.java b/src/main/java/de/ids_mannheim/korap/query/serialize/Serializer.java
index 4cb32b9..3e24e4c 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/Serializer.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/Serializer.java
@@ -25,9 +25,9 @@
     }
 
     public String serializeMeta(List m_queries) throws JsonProcessingException {
-        Map metas = new HashMap();
-        metas.put("meta", m_queries);
-        return mapper.writeValueAsString(metas);
+//        Map metas = new HashMap();
+//        metas.put("meta", m_queries);
+        return mapper.writeValueAsString(m_queries);
     }
 
     public List<Map> serializeResources(List<String> r_queries) throws IOException {
diff --git a/src/test/java/MetaQuerySerializationTest.java b/src/test/java/MetaQuerySerializationTest.java
index ccd0011..b1062d8 100644
--- a/src/test/java/MetaQuerySerializationTest.java
+++ b/src/test/java/MetaQuerySerializationTest.java
@@ -1,8 +1,10 @@
 import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonMappingException;
 import de.ids_mannheim.korap.query.serialize.JsonGenerator;
 import de.ids_mannheim.korap.query.serialize.MetaCollectionSerializer;
 import de.ids_mannheim.korap.query.serialize.MetaQuerySerializer;
+import de.ids_mannheim.korap.query.serialize.Serializer;
 import org.joda.time.DateTime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -11,6 +13,7 @@
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -23,10 +26,12 @@
 
     private MetaQuerySerializer querySerializer;
     private MetaCollectionSerializer collSerializer;
+    private Serializer ser;
 
     public MetaQuerySerializationTest() {
         querySerializer = new MetaQuerySerializer();
         collSerializer = new MetaCollectionSerializer();
+        ser = new Serializer();
     }
 
     @Test
@@ -114,4 +119,28 @@
         }
     }
 
+    @Test
+    public void testLists() {
+        Map<String, String> queries = new LinkedHashMap<>();
+        queries.put("pubDate", "<" + String.valueOf(new DateTime().getMillis()));
+        queries.put("author", "Kafka");
+        List s = querySerializer.serializeQueries(queries, MetaQuerySerializer.TYPE.FILTER);
+
+        queries.clear();
+        queries.put("author", "Hesse");
+
+        List f = querySerializer.serializeQueries(queries, MetaQuerySerializer.TYPE.EXTEND);
+        s.addAll(f);
+        System.out.println("--- ALL " + s);
+    }
+
+    @Test
+    public void testJSONArray() throws JsonProcessingException {
+        Map<String, String> queries = new LinkedHashMap<>();
+        queries.put("pubDate", "<" + String.valueOf(new DateTime().getMillis()));
+        queries.put("author", "Kafka");
+        List s = querySerializer.serializeQueries(queries, MetaQuerySerializer.TYPE.FILTER);
+        System.out.println("array repres " + ser.serializeMeta(s));
+    }
+
 }
