diff --git a/pom.xml b/pom.xml
index 4f31fd3..346693a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,15 +66,17 @@
     	<groupId>org.apache.directory.studio</groupId>
     	<artifactId>org.apache.commons.lang</artifactId>
     	<version>2.6</version>
-    </dependency>
+    </dependency>   
   </dependencies> 
  
-  <!-- <repositories>
+  <repositories>
     <repository>
-      <id>CLARIN</id>
-      <url>https://nexus.clarin.eu/content/repositories/Clarin</url>
-      <url>http://catalog.clarin.eu/ds/nexus/content/repositories/Clarin/</url>
-      <layout>default</layout>
-    </repository>   
-  </repositories> -->
+			<id>CLARIN</id>
+			<name>CLARIN Repository</name>
+			<url>https://nexus.clarin.eu/content/repositories/Clarin</url>
+			<snapshots>
+				<enabled>false</enabled>
+			</snapshots>
+		</repository>
+  </repositories>
 </project>
diff --git a/src/main/java/de/mannheim/ids/korap/sru/KorapClient.java b/src/main/java/de/mannheim/ids/korap/sru/KorapClient.java
index 0776c56..fff2e5d 100644
--- a/src/main/java/de/mannheim/ids/korap/sru/KorapClient.java
+++ b/src/main/java/de/mannheim/ids/korap/sru/KorapClient.java
@@ -29,7 +29,6 @@
 public class KorapClient {
 	
 	private static final String SERVICE_URI = "http://10.0.10.13:7070/api/v0.1/";
-	private String QUERY_LANGUAGE = "CQL";
 	private String CONTEXT_TYPE = "sentence";
 	
 	private int defaultNumOfRecords = 10;
@@ -87,9 +86,9 @@
 	}
 	
 	
-	public KorapResult query(String query, String version, int startRecord, 
-			int maximumRecords, String[] corpora) throws HttpResponseException,
-			IOException {
+	public KorapResult query(String query, QueryLanguage queryLanguage,
+			String version, int startRecord, int maximumRecords,
+			String[] corpora) throws HttpResponseException, IOException {
 		
 		checkQuery(query, startRecord, maximumRecords);
 		
@@ -118,7 +117,8 @@
 		else {*/
 		
 			try {
-				httpRequest = createRequest(query, version, startRecord-1, 
+			httpRequest = createRequest(query, queryLanguage, version,
+					startRecord - 1,
 						maximumRecords);
 			} catch (URISyntaxException e) {
 				throw new IOException("Failed creating http request.");
@@ -163,15 +163,26 @@
 			throws IOException{
 		InputStream is = response.getEntity().getContent(); 
 		JsonNode node = objectMapper.readTree(is);
-		String message = node.get("error").textValue();						
-		String[] errorItems = message.split(":",2);
-		errorItems[0] = errorItems[0].replace("SRU diagnostic ", "");
-		errorItems[1] = errorItems[1].trim();
+		String message = node.get("error").textValue();
+		String[] errorItems;
+		if (message.contains("SRU diagnostic")) {
+			errorItems = message.split(":", 2);
+			errorItems[0] = errorItems[0].replace("SRU diagnostic ", "");
+			errorItems[1] = errorItems[1].trim();
+		}
+		else if (message.contains("not a supported query language")){
+			errorItems = new String[]{"4",
+					"KorAP does not support the query language."};
+		}
+		else {
+			errorItems = new String[]{"1", message};
+		}
+		
 		return errorItems;						
 	}
 	
-	private HttpGet createRequest(String query, String version, int startRecord, 
-			int maximumRecords) 
+	private HttpGet createRequest(String query, QueryLanguage queryLanguage,
+			String version, int startRecord, int maximumRecords)
 			throws URISyntaxException {
 
 		if (maximumRecords <= 0) {
@@ -184,7 +195,7 @@
 		
 		List<NameValuePair> params = new ArrayList<NameValuePair>(); 
 		params.add(new BasicNameValuePair("q", query));
-		params.add(new BasicNameValuePair("ql", QUERY_LANGUAGE));
+		params.add(new BasicNameValuePair("ql", queryLanguage.toString()));
 		params.add(new BasicNameValuePair("v", version));
 		params.add(new BasicNameValuePair("context", CONTEXT_TYPE));
 		params.add(new BasicNameValuePair("count", String.valueOf(maximumRecords)));
diff --git a/src/main/java/de/mannheim/ids/korap/sru/KorapEndpointDescription.java b/src/main/java/de/mannheim/ids/korap/sru/KorapEndpointDescription.java
index 6762b63..76a36f6 100644
--- a/src/main/java/de/mannheim/ids/korap/sru/KorapEndpointDescription.java
+++ b/src/main/java/de/mannheim/ids/korap/sru/KorapEndpointDescription.java
@@ -1,13 +1,17 @@
 package de.mannheim.ids.korap.sru;
 
 import java.io.IOException;
+import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.ServletContext;
+
 import com.fasterxml.jackson.databind.JsonNode;
 
 import eu.clarin.sru.server.SRUConfigException;
@@ -15,6 +19,7 @@
 import eu.clarin.sru.server.SRUException;
 import eu.clarin.sru.server.fcs.DataView;
 import eu.clarin.sru.server.fcs.DataView.DeliveryPolicy;
+import eu.clarin.sru.server.fcs.utils.SimpleEndpointDescriptionParser;
 import eu.clarin.sru.server.fcs.EndpointDescription;
 import eu.clarin.sru.server.fcs.Layer;
 import eu.clarin.sru.server.fcs.ResourceInfo;
@@ -26,24 +31,27 @@
 	private List<String> languages;
 	
 	private String defaultDataview = "hits";
+	private List<Layer> layers;
 
-	public KorapEndpointDescription() throws SRUConfigException {
-		dataviews = new ArrayList<DataView>();
-		dataviews.add(new DataView("hits", "application/x-clarin-fcs-hits+xml",
-				DeliveryPolicy.SEND_BY_DEFAULT));
-		dataviews.add(new DataView("kwic", "application/x-clarin-fcs-kwic+xml",
-				DeliveryPolicy.NEED_TO_REQUEST));
-
-		capabilities = new ArrayList<URI>();
+	public KorapEndpointDescription(ServletContext context)
+			throws SRUConfigException {
 		try {
-			capabilities.add(new URI(
-					"http://clarin.eu/fcs/capability/basic-search"));
-		} catch (URISyntaxException e) {
-			throw new SRUConfigException("Found an invalid capability URI.");
-		}
+			URL url = context.getResource("/WEB-INF/endpoint-description.xml");
+			EndpointDescription simpleEndpointDescription = SimpleEndpointDescriptionParser
+					.parse(url);
+			if (simpleEndpointDescription != null) {
+				setSupportedLayers(simpleEndpointDescription
+						.getSupportedLayers());
+				setSupportedDataViews(simpleEndpointDescription
+						.getSupportedDataViews());
+				setCapabilities(simpleEndpointDescription.getCapabilities());
+			}
 
-		languages = new ArrayList<String>();
-		languages.add("deu");
+		} catch (MalformedURLException e) {
+			throw new SRUConfigException(
+					"error initializing resource info inventory", e);
+		}
+		setLanguages();
 	}
 
 	@Override
@@ -53,16 +61,44 @@
 		languages.clear();
 	}
 
+	public void setLanguages() {
+		languages = new ArrayList<String>();
+		languages.add("deu");
+	}
+
 	@Override
 	public List<URI> getCapabilities() {
 		return capabilities;
 	}
 
+	public void setCapabilities(List<URI> list) throws SRUConfigException {
+		capabilities = list;
+//		new ArrayList<URI>();
+//		try {
+//			capabilities.add(new URI(
+//					"http://clarin.eu/fcs/capability/basic-search"));
+//		} catch (URISyntaxException e) {
+//			throw new SRUConfigException("Found an invalid capability URI.");
+//		}
+	}
+
 	@Override
 	public List<DataView> getSupportedDataViews() {
 		return dataviews;
 	}
 
+	public void setSupportedDataViews(List<DataView> list) {
+		dataviews = list;
+
+		// new ArrayList<DataView>();
+		// dataviews.add(new DataView("hits",
+		// "application/x-clarin-fcs-hits+xml",
+		// DeliveryPolicy.SEND_BY_DEFAULT));
+		// dataviews.add(new DataView("kwic",
+		// "application/x-clarin-fcs-kwic+xml",
+		// DeliveryPolicy.NEED_TO_REQUEST));
+	}
+
 	@Override
 	public List<ResourceInfo> getResourceList(String pid) throws SRUException {
 
@@ -105,9 +141,13 @@
 		this.defaultDataview = defaultDataview;
 	}
 
+	public void setSupportedLayers(List<Layer> list) {
+		this.layers = list;
+	}
+
 	@Override
 	public List<Layer> getSupportedLayers() {
-		return null;
+		return layers;
 	}
 
 }
diff --git a/src/main/java/de/mannheim/ids/korap/sru/KorapSRU.java b/src/main/java/de/mannheim/ids/korap/sru/KorapSRU.java
index 80e01af..f57f6f9 100644
--- a/src/main/java/de/mannheim/ids/korap/sru/KorapSRU.java
+++ b/src/main/java/de/mannheim/ids/korap/sru/KorapSRU.java
@@ -8,9 +8,7 @@
 import org.apache.http.client.HttpResponseException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.z3950.zing.cql.CQLNode;
 
-import eu.clarin.sru.server.CQLQueryParser;
 import eu.clarin.sru.server.SRUConfigException;
 import eu.clarin.sru.server.SRUConstants;
 import eu.clarin.sru.server.SRUDiagnosticList;
@@ -19,7 +17,6 @@
 import eu.clarin.sru.server.SRURequest;
 import eu.clarin.sru.server.SRUSearchResultSet;
 import eu.clarin.sru.server.SRUServerConfig;
-import eu.clarin.sru.server.SRUVersion;
 import eu.clarin.sru.server.fcs.Constants;
 import eu.clarin.sru.server.fcs.DataView;
 import eu.clarin.sru.server.fcs.EndpointDescription;
@@ -28,55 +25,59 @@
 /**
  * @author margaretha
  * */
-public class KorapSRU extends SimpleEndpointSearchEngineBase{
+public class KorapSRU extends SimpleEndpointSearchEngineBase {
 
-	public static final String CLARIN_FCS_RECORD_SCHEMA =
-            "http://clarin.eu/fcs/resource";
-	public static final String KORAP_WEB_URL = 
-			"http://korap.ids-mannheim.de/kalamar";
-	
+	public static final String CLARIN_FCS_RECORD_SCHEMA = "http://clarin.eu/fcs/resource";
+	public static final String KORAP_WEB_URL = "http://korap.ids-mannheim.de/kalamar";
+
+	public static String redirectBaseURI;
 	public static KorapClient korapClient;
 	private KorapEndpointDescription korapEndpointDescription;
 	private SRUServerConfig serverConfig;
 
-	public static String redirectBaseURI;
-	
-	private Logger logger = (Logger) LoggerFactory.getLogger(KorapSRU.class);	
+	private Logger logger = (Logger) LoggerFactory.getLogger(KorapSRU.class);
 
 	@Override
 	protected EndpointDescription createEndpointDescription(
 			ServletContext context, SRUServerConfig config,
 			Map<String, String> params) throws SRUConfigException {
-		korapEndpointDescription = new KorapEndpointDescription();
+		korapEndpointDescription = new KorapEndpointDescription(context);
 		return korapEndpointDescription;
 	}
-	
+
 	@Override
 	protected void doInit(ServletContext context, SRUServerConfig config,
 			SRUQueryParserRegistry.Builder parserRegistryBuilder,
-			Map<String, String> params)
-			throws SRUConfigException {
+			Map<String, String> params) throws SRUConfigException {
 		serverConfig = config;
-		korapClient = new KorapClient(config.getNumberOfRecords(), 
+		korapClient = new KorapClient(config.getNumberOfRecords(),
 				config.getMaximumRecords());
-		
+
 		StringBuilder sb = new StringBuilder();
 		sb.append(config.getTransports());
 		sb.append("://");
-        sb.append(config.getHost());
-        if (config.getPort() != 80) {
-            sb.append(":").append(config.getPort());
-        }
-        sb.append("/").append(config.getDatabase());
-        sb.append("/").append("redirect/");
-        this.redirectBaseURI = sb.toString();
+		sb.append(config.getHost());
+		if (config.getPort() != 80) {
+			sb.append(":").append(config.getPort());
+		}
+		sb.append("/").append(config.getDatabase());
+		sb.append("/").append("redirect/");
+		this.redirectBaseURI = sb.toString();
+
+		// queryParser = new ThreadLocal<QueryParser>() {
+		// @Override
+		// protected QueryParser initialValue() {
+		// return new QueryParser("text", new StandardAnalyzer(
+		// CharArraySet.EMPTY_SET));
+		// }
+		// };
 	}
 
 	@Override
 	public SRUSearchResultSet search(SRUServerConfig config,
 			SRURequest request, SRUDiagnosticList diagnostics)
 			throws SRUException {
-				
+
 		checkRequestRecordSchema(request);
 
 		String dataview = korapEndpointDescription.getDefaultDataView();
@@ -85,107 +86,111 @@
 					request.getExtraRequestData("x-fcs-dataviews"), diagnostics);
 		}
 
-		if (!request.isQueryType(Constants.FCS_QUERY_TYPE_CQL)) {
+		String queryType = request.getQueryType();
+		logger.info("Query language: " + queryType);
+		QueryLanguage queryLanguage;
+		if (request.isQueryType(Constants.FCS_QUERY_TYPE_CQL)) {
+			queryLanguage = QueryLanguage.CQL;
+		} else if (request.isQueryType(Constants.FCS_QUERY_TYPE_FCS)) {
+			queryLanguage = QueryLanguage.FCSQL;
+		} else {
 			throw new SRUException(
 					SRUConstants.SRU_CANNOT_PROCESS_QUERY_REASON_UNKNOWN,
 					"Queries with queryType '"
 							+ request.getQueryType()
 							+ "' are not supported by this CLARIN-FCS Endpoint.");
 		}
-		CQLQueryParser.CQLQuery cqlQuery = request
-				.getQuery(CQLQueryParser.CQLQuery.class);
-		
-		String korapQuery = translateCQLtoKorapQuery(cqlQuery.getParsedQuery());
-        String version = null;
-        if (request.isVersion(SRUVersion.VERSION_1_1)){
-        	 version = "1.1";
-        }
-        else if (request.isVersion(SRUVersion.VERSION_1_2)){
-        	version = "1.2";
-        }
-        else {
-        	serverConfig.getDefaultVersion();
-        }
+		logger.info("Query language: " + queryLanguage);
+
+		String queryStr = null;
+		queryStr = request.getQuery().getRawQuery();
+		if ((queryStr == null) || queryStr.isEmpty()) {
+			throw new SRUException(SRUConstants.SRU_EMPTY_TERM_UNSUPPORTED,
+					"An empty term is not supported.");
+		}
+		logger.info("korapsru query: " + queryStr);
+
+		String version = null;
+		switch (request.getVersion()) {
+			case VERSION_1_1 :
+				version = "1.1";
+			case VERSION_1_2 :
+				version = "1.2";
+			case VERSION_2_0 :
+				version = "2.0";
+			default :
+				serverConfig.getDefaultVersion();
+		}
 
 		KorapResult korapResult = new KorapResult();
 		try {
-			korapResult = korapClient.query(
-					korapQuery,
-					version,
-					request.getStartRecord(), 
-					request.getMaximumRecords(),
-					getCorporaList(request)
-			);
-		}
-		catch (HttpResponseException e) {
-			logger.warn("HttpResponseException: " +e.getStatusCode()+" "+e.getMessage());
+			korapResult = korapClient.query(queryStr, queryLanguage, version,
+					request.getStartRecord(), request.getMaximumRecords(),
+					getCorporaList(request));
+		} catch (HttpResponseException e) {
+			logger.warn("HttpResponseException: " + e.getStatusCode() + " "
+					+ e.getMessage());
 			switch (e.getStatusCode()) {
-			case 16:
-				throw new SRUException(SRUConstants.SRU_UNSUPPORTED_INDEX, 
-						e.getMessage());
-			case 19:
-				throw new SRUException(SRUConstants.SRU_UNSUPPORTED_RELATION, 
-						e.getMessage());	
-			case 20: 
-				throw new SRUException(SRUConstants.SRU_UNSUPPORTED_RELATION_MODIFIER,
-						e.getMessage());			
-			case 27: 
-				throw new SRUException(SRUConstants.SRU_EMPTY_TERM_UNSUPPORTED,
-						e.getMessage());
-			case 48 :
-				throw new SRUException(SRUConstants.SRU_QUERY_FEATURE_UNSUPPORTED, 
-						e.getMessage());
-			default: 
+				case 16 :
+					throw new SRUException(SRUConstants.SRU_UNSUPPORTED_INDEX,
+							e.getMessage());
+				case 19 :
+					throw new SRUException(
+							SRUConstants.SRU_UNSUPPORTED_RELATION,
+							e.getMessage());
+				case 20 :
+					throw new SRUException(
+							SRUConstants.SRU_UNSUPPORTED_RELATION_MODIFIER,
+							e.getMessage());
+				case 27 :
+					throw new SRUException(
+							SRUConstants.SRU_EMPTY_TERM_UNSUPPORTED,
+							e.getMessage());
+				case 48 :
+					throw new SRUException(
+							SRUConstants.SRU_QUERY_FEATURE_UNSUPPORTED,
+							e.getMessage());
+				default :
 					throw new SRUException(
 							SRUConstants.SRU_GENERAL_SYSTEM_ERROR,
 							e.getMessage());
 			}
-			
-		}
-		catch (IOException e) {
+
+		} catch (IOException e) {
 			throw new SRUException(SRUConstants.SRU_GENERAL_SYSTEM_ERROR,
 					e.getMessage());
-		}		
-		
+		}
+
 		return new KorapSRUSearchResultSet(diagnostics, korapResult, dataview);
 	}
-	
-	private String[] getCorporaList(SRURequest request){
-		try { 
+
+	private String[] getCorporaList(SRURequest request) {
+		try {
 			String corpusPids = request.getExtraRequestData("x-fcs-context");
-			if (!corpusPids.isEmpty() && corpusPids != null){
-				if (corpusPids.contains(",")){
+			if (!corpusPids.isEmpty() && corpusPids != null) {
+				if (corpusPids.contains(",")) {
 					return corpusPids.split(",");
 				}
 				return new String[]{corpusPids};
 			}
 			return null;
-		}
-		catch (NullPointerException e) {
+		} catch (NullPointerException e) {
 			return null;
 		}
 	}
-	
-	private String translateCQLtoKorapQuery(CQLNode query) throws SRUException {
-		String queryStr = query.toString();
-		if ((queryStr == null) || queryStr.isEmpty()) {
-            throw new SRUException(SRUConstants.SRU_EMPTY_TERM_UNSUPPORTED,
-                    "An empty term is not supported.");
-        }
-		return queryStr;
-	}
-	
-	private void checkRequestRecordSchema(SRURequest request) throws SRUException{
-		final String recordSchemaIdentifier =
-	            request.getRecordSchemaIdentifier();
-	        if ((recordSchemaIdentifier != null) &&
-	                !recordSchemaIdentifier.equals(CLARIN_FCS_RECORD_SCHEMA)) {
-	            throw new SRUException(
-	                    SRUConstants.SRU_UNKNOWN_SCHEMA_FOR_RETRIEVAL,
-	                    recordSchemaIdentifier, "Record schema \"" +
-	                    recordSchemaIdentifier +
-	                    "\" is not supported by this endpoint.");
-	        }
+
+	private void checkRequestRecordSchema(SRURequest request)
+			throws SRUException {
+		final String recordSchemaIdentifier = request
+				.getRecordSchemaIdentifier();
+		if ((recordSchemaIdentifier != null)
+				&& !recordSchemaIdentifier.equals(CLARIN_FCS_RECORD_SCHEMA)) {
+			throw new SRUException(
+					SRUConstants.SRU_UNKNOWN_SCHEMA_FOR_RETRIEVAL,
+					recordSchemaIdentifier, "Record schema \""
+							+ recordSchemaIdentifier
+							+ "\" is not supported by this endpoint.");
+		}
 	}
 
 	private String getRequestDataView(String requestDataview,
@@ -205,6 +210,4 @@
 		}
 		return korapEndpointDescription.getDefaultDataView();
 	}
-
-		
 }
diff --git a/src/main/java/de/mannheim/ids/korap/sru/QueryLanguage.java b/src/main/java/de/mannheim/ids/korap/sru/QueryLanguage.java
new file mode 100644
index 0000000..98d2d28
--- /dev/null
+++ b/src/main/java/de/mannheim/ids/korap/sru/QueryLanguage.java
@@ -0,0 +1,5 @@
+package de.mannheim.ids.korap.sru;
+
+public enum QueryLanguage {
+	CQL, FCSQL;
+}
diff --git a/src/main/webapp/WEB-INF/endpoint-description.xml b/src/main/webapp/WEB-INF/endpoint-description.xml
new file mode 100644
index 0000000..1bd2b25
--- /dev/null
+++ b/src/main/webapp/WEB-INF/endpoint-description.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    This file has the same format as the XML serialization of endpoint
+    description from the CLARIN-FCS specification.
+-->
+<EndpointDescription xmlns="http://clarin.eu/fcs/endpoint-description"
+    version="2">
+    <Capabilities>
+        <Capability>http://clarin.eu/fcs/capability/basic-search</Capability>
+        <Capability>http://clarin.eu/fcs/capability/advanced-search</Capability>
+    </Capabilities>
+    <SupportedDataViews>
+        <SupportedDataView id="hits" delivery-policy="send-by-default">application/x-clarin-fcs-hits+xml</SupportedDataView>
+        <SupportedDataView id="adv" delivery-policy="send-by-default">application/x-clarin-fcs-adv+xml</SupportedDataView>
+        <SupportedDataView id="kwic" delivery-policy="need-to-request">application/x-clarin-fcs-kwic+xml</SupportedDataView>
+    </SupportedDataViews>
+    <SupportedLayers>
+        <SupportedLayer id="l1" result-id="http://clarin.ids-mannheim.de/korapsru/layers/text">text</SupportedLayer>
+        <SupportedLayer id="l2" result-id="http://clarin.ids-mannheim.de/korapsru/layers/pos1" qualifier="cnx"
+        	alt-value-info="based on STTS tagset"
+        	alt-value-info-uri="http://www.ims.uni-stuttgart.de/forschung/ressourcen/lexika/TagSets/stts-table.html">pos</SupportedLayer>
+        <SupportedLayer id="l3" result-id="http://clarin.ids-mannheim.de/korapsru/layers/pos2" qualifier="tt"
+            alt-value-info="based on STTS tagset"
+            alt-value-info-uri="http://www.ims.uni-stuttgart.de/forschung/ressourcen/lexika/TagSets/stts-table.html">pos</SupportedLayer>
+        <SupportedLayer id="l4" result-id="http://clarin.ids-mannheim.de/korapsru/layers/pos3" qualifier="opennlp"
+            alt-value-info="based on STTS tagset"
+            alt-value-info-uri="http://www.ims.uni-stuttgart.de/forschung/ressourcen/lexika/TagSets/stts-table.html">pos</SupportedLayer>
+       <SupportedLayer id="l5" result-id="http://clarin.ids-mannheim.de/korapsru/layers/pos4" qualifier="mate"
+            alt-value-info="based on STTS tagset"
+            alt-value-info-uri="http://www.ims.uni-stuttgart.de/forschung/ressourcen/lexika/TagSets/stts-table.html">pos</SupportedLayer>        
+        <SupportedLayer id="l6" result-id="http://clarin.ids-mannheim.de/korapsru/layers/pos5" qualifier="xip"
+            alt-value-info="based on STTS tagset"
+            alt-value-info-uri="http://www.ims.uni-stuttgart.de/forschung/ressourcen/lexika/TagSets/stts-table.html">pos</SupportedLayer>       
+        <SupportedLayer id="l7" result-id="http://clarin.ids-mannheim.de/korapsru/layers/lemma1" qualifier="cnx">lemma</SupportedLayer>
+        <SupportedLayer id="l8" result-id="http://clarin.ids-mannheim.de/korapsru/layers/lemma2" qualifier="tt">lemma</SupportedLayer>
+        <SupportedLayer id="l9" result-id="http://clarin.ids-mannheim.de/korapsru/layers/lemma3" qualifier="mate">lemma</SupportedLayer>
+        <SupportedLayer id="l10" result-id="http://clarin.ids-mannheim.de/korapsru/layers/lemma4" qualifier="xip">lemma</SupportedLayer>
+    </SupportedLayers>
+    <Resources>
+     	<Resource pid="dummy pid">
+           <Title xml:lang="en">dummy resource</Title>
+           <Languages>
+               <Language>deu</Language>
+           </Languages>
+           <AvailableDataViews ref="hits"/>
+        </Resource>
+    </Resources>
+</EndpointDescription>
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 6f63574..d651b31 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -9,7 +9,11 @@
   <servlet>
     <display-name>KorAP SRU/CQL Service (HTTP Interface)</display-name>
     <servlet-name>KorapSRU</servlet-name>
-    <servlet-class>eu.clarin.sru.server.utils.SRUServerServlet</servlet-class>    
+    <servlet-class>eu.clarin.sru.server.utils.SRUServerServlet</servlet-class>
+    <!-- <init-param>
+        <param-name>de.mannheim.ids.korap.sru.indexDir</param-name>
+        <param-value>/usr/local/java/apps/korapsru/index</param-value>
+    </init-param>     -->
     <init-param>
         <param-name>eu.clarin.sru.server.numberOfRecords</param-name>
         <param-value>25</param-value>
@@ -50,10 +54,10 @@
     	<param-name>eu.clarin.sru.server.legacyNamespaceMode</param-name>
     	<param-value>loc</param-value>
     </init-param>
-    <!-- <init-param>
+    <init-param>
     	<param-name>eu.clarin.sru.server.sruSupportedVersionMax</param-name>
     	<param-value>2.0</param-value>
-    </init-param> -->
+    </init-param>
     <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
diff --git a/src/test/java/de/mannheim/ids/korap/test/KorapClientTest.java b/src/test/java/de/mannheim/ids/korap/test/KorapClientTest.java
index 845a288..83b8d5d 100644
--- a/src/test/java/de/mannheim/ids/korap/test/KorapClientTest.java
+++ b/src/test/java/de/mannheim/ids/korap/test/KorapClientTest.java
@@ -7,6 +7,7 @@
 
 import de.mannheim.ids.korap.sru.KorapClient;
 import de.mannheim.ids.korap.sru.KorapResult;
+import de.mannheim.ids.korap.sru.QueryLanguage;
 
 
 public class KorapClientTest {
@@ -16,7 +17,8 @@
 		KorapClient c = new KorapClient(25,50);
 		
 //		prox Kuh
-		KorapResult result = c.query("Haus", "1.2", 1, 5, null);
+		KorapResult result = c.query("Haus", QueryLanguage.CQL, "1.2", 1, 5,
+				null);
 		//System.out.println(result.getMatches().size());
 		
 	}
