diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQuery.java b/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQuery.java
index 6fa6465..c758f1d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/CollectionQuery.java
@@ -1,12 +1,11 @@
 package de.ids_mannheim.korap.query.serialize;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.Multimap;
 import com.google.common.collect.Multiset;
 import de.ids_mannheim.korap.resource.Relation;
+import de.ids_mannheim.korap.utils.JsonUtils;
 import lombok.Data;
 
 import java.io.IOException;
@@ -20,8 +19,6 @@
  */
 public class CollectionQuery {
 
-
-    private static ObjectMapper serialzer = new ObjectMapper();
     private CollectionTypes types;
     private List<Map> rq;
     private Multimap<String, String> mfilter;
@@ -39,12 +36,11 @@
 
     public CollectionQuery addResource(String query) {
         try {
-            List v = serialzer.readValue(query, LinkedList.class);
+            List v = JsonUtils.read(query, LinkedList.class);
             this.rq.addAll(v);
         } catch (IOException e) {
             throw new IllegalArgumentException("Conversion went wrong!");
         }
-
         return this;
     }
 
@@ -229,13 +225,7 @@
     public String toCollections() {
         Map meta = new LinkedHashMap();
         meta.put("collections", join());
-
-        try {
-            return serialzer.writeValueAsString(meta);
-        } catch (JsonProcessingException e) {
-            e.printStackTrace();
-            return "";
-        }
+        return JsonUtils.toJSON(meta);
     }
 
     /**
@@ -244,17 +234,11 @@
      * @return
      */
     public JsonNode buildNode() {
-        return serialzer.valueToTree(join());
+        return JsonUtils.valueToTree(join());
     }
 
     public String buildString() {
-        try {
-            return serialzer.writeValueAsString(join());
-        } catch (JsonProcessingException e) {
-            e.printStackTrace();
-            return "";
-        }
-
+        return JsonUtils.toJSON(join());
     }
 
 
@@ -301,7 +285,6 @@
             String sub = queries.substring(queries.indexOf(whole), queries.lastIndexOf(whole));
             queries.replace(whole, "");
         }
-
     }
 
     private void v(String queries, boolean filter) {
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/MetaQuery.java b/src/main/java/de/ids_mannheim/korap/query/serialize/MetaQuery.java
index 5312274..0eb790d 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/MetaQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/MetaQuery.java
@@ -1,8 +1,5 @@
 package de.ids_mannheim.korap.query.serialize;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
 import java.util.LinkedHashMap;
 import java.util.LinkedList;
 import java.util.List;
@@ -14,11 +11,9 @@
  */
 public class MetaQuery {
 
-    private ObjectMapper serialier;
     private Map meta;
 
     public MetaQuery() {
-        this.serialier = new ObjectMapper();
         this.meta = new LinkedHashMap();
     }
 
@@ -46,11 +41,4 @@
         return meta;
     }
 
-    public String toMetaString() {
-        try {
-            return serialier.writeValueAsString(meta);
-        } catch (JsonProcessingException e) {
-            return "";
-        }
-    }
 }
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java b/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
index a798968..fbe0af0 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
@@ -2,11 +2,10 @@
 
 import com.fasterxml.jackson.core.JsonGenerationException;
 import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import de.ids_mannheim.korap.util.QueryException;
+import de.ids_mannheim.korap.utils.JsonUtils;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
 import java.io.IOException;
 import java.util.Map;
 
@@ -17,7 +16,6 @@
 
     public static String queryLanguageVersion;
 
-    private ObjectMapper mapper;
     private AbstractSyntaxTree ast;
     private Object collection;
     private Object meta;
@@ -25,7 +23,6 @@
             .getLogger(QuerySerializer.class);
 
     public QuerySerializer() {
-        mapper = new ObjectMapper();
 //        mapper.enable(SerializationFeature.INDENT_OUTPUT);
     }
 
@@ -124,10 +121,9 @@
             throw new QueryException(queryLanguage + " is not a supported query language!");
         }
         Map<String, Object> requestMap = ast.getRequestMap();
-        mapper.writeValue(new File(outFile), requestMap);
+//        mapper.writeValue(new File(outFile), requestMap);
     }
 
-    // change page to startindex
     public QuerySerializer setQuery(String query, String ql, String version)
             throws QueryException {
         try {
@@ -148,17 +144,13 @@
         } catch (QueryException e) {
             throw e;
         } catch (Exception e) {
-            throw new QueryException("UNKNOWN: Query could not be parsed");
+            throw new QueryException("UNKNOWN: Query could not be parsed (" + query + ")");
         }
         return this;
     }
 
     public final String build() {
-        try {
-            return mapper.writeValueAsString(raw());
-        } catch (IOException e) {
-            return "";
-        }
+        return JsonUtils.toJSON(raw());
     }
 
 
@@ -183,6 +175,11 @@
         return this;
     }
 
+    public QuerySerializer setMeta(MetaQuery meta) {
+        this.meta = meta.raw();
+        return this;
+    }
+
     public QuerySerializer setCollection(String collection) {
         CollectionQuery qobj = new CollectionQuery();
         qobj.addResource(collection);
