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 42665ea..41ebd01 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
@@ -33,37 +33,6 @@
         this.types = new MetaTypes();
     }
 
-    /**
-     * temporary solution, since there is no other place for this right now!
-     *
-     * @param request
-     * @param page
-     * @param num
-     * @param cli
-     * @param cri
-     * @param cls
-     * @param crs
-     * @return
-     */
-    public static Map addParameters(Map request, int page, int num, String cli, String cri,
-                                    int cls, int crs) {
-        Map ctx = new LinkedHashMap();
-        List left = new ArrayList();
-        left.add(cli);
-        left.add(cls);
-        List right = new ArrayList();
-        right.add(cri);
-        right.add(crs);
-        ctx.put("left", left);
-        ctx.put("right", right);
-
-        request.put("startPage", page);
-        request.put("count", num);
-        request.put("context", ctx);
-
-        return request;
-    }
-
     public MetaQuery addResource(String query) {
         try {
             JsonParser jp = factory.createParser(query);
@@ -196,12 +165,12 @@
         for (String value : dates) {
             if (value.contains("<")) {
                 String[] sp = value.split("<");
-                el[1] = types.formatDate(Long.valueOf(sp[1]), MetaTypes.YMD);
+                el[1] = sp[1];
             } else if (value.contains(">")) {
                 String[] sp = value.split(">");
-                el[2] = types.formatDate(Long.valueOf(sp[1]), MetaTypes.YMD);
+                el[2] = sp[1];
             } else {
-                el[idx] = types.formatDate(Long.valueOf(value), MetaTypes.YMD);
+                el[idx] = value;
                 idx++;
             }
         }
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/MetaTypes.java b/src/main/java/de/ids_mannheim/korap/query/serialize/MetaTypes.java
index 59a9376..cee079a 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/MetaTypes.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/MetaTypes.java
@@ -93,30 +93,6 @@
         return meta;
     }
 
-    public String formatDate(long date, String format) {
-        DateTime time = new DateTime(date);
-        String month, day;
-
-        if (time.getDayOfMonth() < 10)
-            day = "0" + time.getDayOfMonth();
-        else
-            day = String.valueOf(time.getDayOfMonth());
-
-        if (time.getMonthOfYear() < 10)
-            month = "0" + time.getMonthOfYear();
-        else
-            month = String.valueOf(time.getMonthOfYear());
-
-        switch (format) {
-            case YM:
-                return time.getYear() + "-" + month;
-            case YMD:
-                return time.getYear() + "-" + month + "-" + day;
-            default:
-                return String.valueOf(time.getYear());
-        }
-    }
-
     public Map mapify(String s) throws IOException {
         return mapper.readValue(s, Map.class);
     }
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/JsonGenerator.java b/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
similarity index 92%
rename from src/main/java/de/ids_mannheim/korap/query/serialize/JsonGenerator.java
rename to src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
index 8cd4d48..0f68298 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/JsonGenerator.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/QuerySerializer.java
@@ -13,14 +13,14 @@
 /**
  * @author bingel, hanl
  */
-public class JsonGenerator {
+public class QuerySerializer {
 
     private ObjectMapper mapper;
     private AbstractSyntaxTree ast;
     private org.slf4j.Logger log = LoggerFactory
-            .getLogger(JsonGenerator.class);
+            .getLogger(QuerySerializer.class);
 
-    public JsonGenerator() {
+    public QuerySerializer() {
         mapper = new ObjectMapper();
     }
 
@@ -31,7 +31,7 @@
         /*
          * just for testing...
 		 */
-        JsonGenerator jg = new JsonGenerator();
+        QuerySerializer jg = new QuerySerializer();
         int i = 0;
         String[] queries;
         if (args.length == 0) {
@@ -86,7 +86,7 @@
     }
 
     /**
-     * Runs the JsonGenerator by initializing the relevant AbstractSyntaxTree implementation (depending on specified query language)
+     * Runs the QuerySerializer by initializing the relevant AbstractSyntaxTree implementation (depending on specified query language)
      * and transforms and writes the tree's requestMap to the specified output file.
      *
      * @param outFile       The file to which the serialization is written
@@ -129,7 +129,7 @@
 
         try {
             requestMap.put("meta", metaQuery.raw());
-            requestMap = MetaQuery.addParameters(requestMap, page, num,
+            requestMap = QueryUtils.addParameters(requestMap, page, num,
                     cli, cri, cls, crs);
             String res = mapper.writeValueAsString(requestMap);
             return res;
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/QueryUtils.java b/src/main/java/de/ids_mannheim/korap/query/serialize/QueryUtils.java
new file mode 100644
index 0000000..4491abe
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/QueryUtils.java
@@ -0,0 +1,140 @@
+package de.ids_mannheim.korap.query.serialize;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author hanl
+ * @date 10/12/2013
+ */
+public class QueryUtils {
+
+
+
+
+    public static String buildCypherQuery(String cypher, String ctypel, String ctyper,
+                                    int cl, int cr, int page, int limit) {
+        //todo: implies that there is only one type allowed!
+        String sctypel = "", sctyper = "";
+        switch (ctypel) {
+            case "C":
+                sctypel = "chars";
+                break;
+            case "T":
+                sctypel = "tokens";
+                break;
+        }
+        switch (ctyper) {
+            case "C":
+                sctyper = "chars";
+                break;
+            case "T":
+                sctyper = "tokens";
+                break;
+        }
+
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("<query><cypher><![CDATA[");
+        buffer.append(cypher);
+        buffer.append("]]></cypher>");
+        buffer.append("<wordAliasPrefix>wtok_</wordAliasPrefix>");
+        buffer.append("<contextColumn>sent</contextColumn>");
+        buffer.append("<contextIdColumn>sid</contextIdColumn>");
+        buffer.append("<textColumn>txt</textColumn>");
+        buffer.append("<startIndex>");
+        buffer.append(page);
+        buffer.append("</startIndex>");
+        buffer.append("<itemsPerPage>");
+        buffer.append(limit);
+        buffer.append("</itemsPerPage>");
+        buffer.append("<context>");
+        buffer.append("<left>");
+        buffer.append("<" + sctypel + ">");
+        buffer.append(cl);
+        buffer.append("</" + sctypel + ">");
+        buffer.append("</left>");
+        buffer.append("<right>");
+        buffer.append("<" + sctyper + ">");
+        buffer.append(cr);
+        buffer.append("</" + sctyper + ">");
+        buffer.append("</right>");
+        buffer.append("</context>");
+        buffer.append("</query>");
+        return buffer.toString();
+    }
+
+    public static String buildDotQuery(long sid, String graphdb_id) {
+        StringBuffer b = new StringBuffer();
+        b.append("<query>");
+        b.append("<sentenceId>");
+        b.append(sid);
+        b.append("</sentenceId>");
+        b.append("<gdbId>");
+        b.append(graphdb_id);
+        b.append("</gdbId>");
+        b.append("<hls>");
+        b.append("<hl>");
+        b.append(40857);
+        b.append("</hl>");
+        b.append("<hl>");
+        b.append(40856);
+        b.append("</hl>");
+        b.append("</hls>");
+        b.append("</query>");
+
+        return b.toString();
+    }
+
+    public String buildaggreQuery(String query) {
+        StringBuffer b = new StringBuffer();
+        b.append("<query><cypher><![CDATA[");
+        b.append(query);
+        b.append("]]></cypher>");
+        b.append("<columns>");
+        b.append("<column agg='true' sum='false'>");
+        b.append("<cypherAlias>");
+        b.append("aggBy");
+        b.append("</cypherAlias>");
+        b.append("<displayName>");
+        b.append("Aggregate");
+        b.append("</displayName>");
+        b.append("</column>");
+
+        b.append("<column agg='fals' sum='true'>");
+        b.append("<cypherAlias>");
+        b.append("cnt");
+        b.append("</cypherAlias>");
+        b.append("<displayName>");
+        b.append("Count");
+        b.append("</displayName>");
+        b.append("</column>");
+        b.append("</columns>");
+
+        b.append("</query>");
+        return b.toString();
+    }
+
+    public static Map addParameters(Map request, int page, int num, String cli, String cri,
+                                    int cls, int crs) {
+        Map ctx = new LinkedHashMap();
+        List left = new ArrayList();
+        left.add(cli);
+        left.add(cls);
+        List right = new ArrayList();
+        right.add(cri);
+        right.add(crs);
+        ctx.put("left", left);
+        ctx.put("right", right);
+
+        request.put("startPage", page);
+        request.put("count", num);
+        request.put("context", ctx);
+
+        return request;
+    }
+
+
+
+}
diff --git a/src/test/java/MetaQuerySerializationTest.java b/src/test/java/MetaQuerySerializationTest.java
index fc389b8..580d2be 100644
--- a/src/test/java/MetaQuerySerializationTest.java
+++ b/src/test/java/MetaQuerySerializationTest.java
@@ -1,7 +1,7 @@
 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.QuerySerializer;
 import de.ids_mannheim.korap.query.serialize.MetaQuery;
 import org.joda.time.DateTime;
 import org.junit.Assert;
@@ -85,7 +85,7 @@
                    /*
          * just for testing...
 		 */
-        JsonGenerator jg = new JsonGenerator();
+        QuerySerializer jg = new QuerySerializer();
         int i = 0;
         String[] queries;
         queries = new String[]{
