diff --git a/src/main/java/de/mannheim/ids/sruws/Corpus.java b/src/main/java/de/mannheim/ids/sruws/Corpus.java
index b980e15..3d80def 100644
--- a/src/main/java/de/mannheim/ids/sruws/Corpus.java
+++ b/src/main/java/de/mannheim/ids/sruws/Corpus.java
@@ -3,19 +3,27 @@
 import java.util.ArrayList;
 import java.util.List;
 
-public class Corpus {
+public class Corpus {	
 	String name;
 	String pid;
-	List<String[]> tokenizedSentences;
+	List<Sentence> sentences;
 	
 	public Corpus(String pid, String name) {
 		this.pid = pid;
 		this.name = name;
-		tokenizedSentences =new ArrayList<String[]>();
+		this.sentences = new ArrayList<Sentence>();		
 	}
 	
-	public void addSentence(String sentence){
-		tokenizedSentences.add(sentence.split("\\s+"));
+	public List<Sentence> getSentences() {
+		return sentences;
+	}
+
+	public void setSentences(List<Sentence> sentences) {
+		this.sentences = sentences;
+	}
+
+	public void addSentence(Sentence s){
+		sentences.add(s);
 	}
 	
 	public String getName() {
@@ -30,13 +38,4 @@
 	public void setPid(String pid) {
 		this.pid = pid;
 	}
-	public List<String[]> getTokenizedSentences() {
-		return tokenizedSentences;
-	}
-	public void setTokenizedSentences(List<String[]> tokenizedSentences) {
-		this.tokenizedSentences = tokenizedSentences;
-	}
-
-	
-	
 }
diff --git a/src/main/java/de/mannheim/ids/sruws/SRU_WS.java b/src/main/java/de/mannheim/ids/sruws/SRU_WS.java
index fa7d21d..a58e14c 100644
--- a/src/main/java/de/mannheim/ids/sruws/SRU_WS.java
+++ b/src/main/java/de/mannheim/ids/sruws/SRU_WS.java
@@ -9,14 +9,24 @@
 import java.net.URISyntaxException;
 import java.net.URLDecoder;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.StreamingOutput;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
@@ -25,8 +35,8 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.events.XMLEvent;
 
+import org.apache.commons.lang3.ArrayUtils;
 import org.apache.http.HttpEntity;
-import org.apache.http.HttpHeaders;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.utils.URIBuilder;
@@ -37,7 +47,6 @@
 import org.xml.sax.SAXException;
 
 import eu.clarin.weblicht.wlfxb.io.WLDObjector;
-import eu.clarin.weblicht.wlfxb.io.WLFormatException;
 import eu.clarin.weblicht.wlfxb.tc.api.MatchedCorpus;
 import eu.clarin.weblicht.wlfxb.tc.api.MatchesLayer;
 import eu.clarin.weblicht.wlfxb.tc.api.SentencesLayer;
@@ -50,12 +59,14 @@
  * @author margaretha
  * */
 
-public class SRU_WS extends HttpServlet{
+@Path("/")
+public class SRU_WS{
 	
 	private String endpointUri;
 	private String endpointBase = "de.mannheim.ids.sruws.endpoint.";
-	private String DUMMY_PID = "Wikipedia";
+	private Corpus defaultCorpus;
 	
+	private static final int DEFAULT_MAX_RECORDS = 10;
 	private static final String HITS_NS = "http://clarin.eu/fcs/dataview/hits";
     private static final String HITS_PREFIX = "hits";    
     private static final String FCS_NS = "http://clarin.eu/fcs/1.0";
@@ -65,11 +76,85 @@
         
     private static String CORPUS_LANG = "de";
     private static String QUERY_LANG = "CQL";   
-	private Map<String,Corpus> corpusList = new HashMap<String,Corpus>();
-    
-	private Logger logger = (Logger) LoggerFactory.getLogger(SRU_WS.class);
-	private SAXParserFactory factory = SAXParserFactory.newInstance();
-			
+	private Map<String,Corpus> corpusList;
+	private SAXParserFactory factory;
+	private Logger logger;
+	
+	@Context
+	ServletConfig config;	
+	
+	public SRU_WS() {
+		logger = (Logger) LoggerFactory.getLogger(SRU_WS.class);
+		factory = SAXParserFactory.newInstance();
+		corpusList = new HashMap<String,Corpus>();
+	}
+	
+	@GET
+	@Produces(MediaType.TEXT_XML)
+	public StreamingOutput doGet(@QueryParam("query") String query, 
+			@QueryParam("endpoint") String endpoint, 
+			@QueryParam("maximumRecords") int maximumRecords) throws IOException, ServletException{
+		return process(endpoint, query,  maximumRecords);
+	};
+	
+	@POST
+	@Produces(MediaType.TEXT_XML)
+	@Consumes("text/query-cql")
+	public StreamingOutput doPost(@QueryParam("query") String query, 
+			@QueryParam("endpoint") String endpoint, 
+			@QueryParam("maximumRecords") int maximumRecords) throws IOException, ServletException{
+		
+		return process(endpoint, query,  maximumRecords);				
+	}
+	
+	private StreamingOutput process(String endpoint, String query, int max) 
+			throws IOException, ServletException {		
+		
+		if (endpoint == null || endpoint.isEmpty()){
+			throw new WebApplicationException(
+					Response.status(Response.Status.BAD_REQUEST)
+							.entity("Endpoint parameter cannot be empty.")
+							.type(MediaType.TEXT_PLAIN).build());
+		}
+		else if (config.getInitParameter(endpointBase+endpoint) == null){
+			throw new WebApplicationException(
+					Response.status(Response.Status.BAD_REQUEST)
+							.entity("Endpoint URL for the endpoint parameter cannot be found.")
+							.type(MediaType.TEXT_PLAIN).build());
+		}
+		else if (query == null || query.isEmpty()){
+			throw new WebApplicationException(
+					Response.status(Response.Status.BAD_REQUEST)
+							.entity("Query cannot be empty.")
+							.type(MediaType.TEXT_PLAIN).build());
+		}
+					
+		if (max==0) max = DEFAULT_MAX_RECORDS;
+		
+		endpointUri = config.getInitParameter(endpointBase+endpoint);
+		logger.info("Endpoint URL {} ",endpointUri);
+		
+		generateCorpusList();
+		logger.info(query.toString());
+		
+		HttpGet getReq = createSearchRetrieveRequest(query, max);			
+		CloseableHttpClient httpClient = HttpClients.createDefault();
+		CloseableHttpResponse httpResponse = httpClient.execute(getReq);
+		HttpEntity httpEntity = httpResponse.getEntity();
+		BufferedInputStream bis = new BufferedInputStream(httpEntity.getContent());
+		
+		String text;
+		try {
+			text = readKwicInput(bis);
+			//logger.info(text);
+		} catch (XMLStreamException e) {				
+			throw new ServletException("XML streaming error");
+		}			
+		
+		return writeTCL(text, query);
+		
+	}
+	
 	private void generateCorpusList() throws IOException{
 		corpusList = new HashMap<String, Corpus>();
 		
@@ -94,106 +179,20 @@
 			SAXParser saxParser = factory.newSAXParser();
 			SRUScanResonseHandler handler = new SRUScanResonseHandler();
 			saxParser.parse(bis, handler);
-			corpusList = handler.getCorpora();
+			corpusList = handler.getCorpora();					
 			
 		} catch (ParserConfigurationException | SAXException e) {
 			e.printStackTrace();
 		}
-	}
 		
-	@Override
-	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
-			throws ServletException, IOException {
-						
-		String endpoint = req.getParameter("endpoint");
-		String query = req.getParameter("query");
-		String max = req.getParameter("maximumRecords");
-		
-		if (!req.getHeader(HttpHeaders.ACCEPT).equals("text/query-cql")){
-			resp.sendError(HttpServletResponse.SC_BAD_REQUEST,
-					"Only Accept request-header of mediatype 'text/query-cql' is accepted.");
-		}
-		else if (endpoint == null || endpoint.isEmpty()){
-			resp.sendError(HttpServletResponse.SC_BAD_REQUEST,
-					"Endpoint parameter cannot be empty.");
-		}
-		else if (getServletConfig().getInitParameter(endpointBase+endpoint) == null){
-			resp.sendError(HttpServletResponse.SC_BAD_REQUEST,
-					"Endpoint parameter is incorrect.");
-		}
-		else if (query == null || query.isEmpty()){
-			resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "Query cannot be empty.");
-		}		
-		else if (max == null || max.isEmpty() || max.equals("0")){
-			resp.sendError(HttpServletResponse.SC_BAD_REQUEST, 
-					"The maximumRecords must be specified greater than 0.");
-		}
-		else{			
-			
-			endpointUri = getServletConfig().getInitParameter(endpointBase+endpoint);
-			logger.info("Endpoint URL {} ",endpointUri);		
-			
-			generateCorpusList();
-			
-			HttpGet getReq = createSearchRetrieveRequest(query, req.getParameter("maximumRecords"));			
-			CloseableHttpClient httpClient = HttpClients.createDefault();
-			CloseableHttpResponse httpResponse = httpClient.execute(getReq);
-			HttpEntity httpEntity = httpResponse.getEntity();
-			BufferedInputStream bis = new BufferedInputStream(httpEntity.getContent());
-			
-			//List<String[]> tokenizedSentences = new ArrayList<String[]>();
-			String text;
-			try {
-				//text = readInput(bis, tokenizedSentences);
-				text = readKwicInput(bis);
-				//logger.info(text);
-			} catch (XMLStreamException e) {				
-				throw new ServletException("XML streaming error");
-			}
-			
-			writeTCL(resp.getOutputStream(), text, query);
-			//writeTCL(resp.getOutputStream(), text, tokenizedSentences, query);
-		}
+		defaultCorpus = new Corpus(endpointUri, endpointUri);
+		corpusList.put(endpointUri, defaultCorpus);
 	}
-	
-	public void writeTCL(OutputStream out, String text, List<String[]> tokenizedSentences, String query){
-		TextCorpusStored textCorpus = new TextCorpusStored(CORPUS_LANG);
+			
+	private StreamingOutput writeTCL(String text, String query){
+		final TextCorpusStored textCorpus = new TextCorpusStored(CORPUS_LANG);
 		textCorpus.createTextLayer().addText(text);
-
-		TokensLayer tokensLayer = textCorpus.createTokensLayer();
-		SentencesLayer sentencesLayer = textCorpus.createSentencesLayer();	
-		MatchesLayer matchesLayer = textCorpus.createMatchesLayer(QUERY_LANG, query);
-		MatchedCorpus matchedCorpus = matchesLayer.addCorpus("Wikipedia", "WikiPID");
 		
-		List<Token> itemToken = new ArrayList<Token>();
-		for (int i=0; i<tokenizedSentences.size();i++){			
-			List<Token> sentenceTokens = new ArrayList<Token>();				
-			for (String tokenString : tokenizedSentences.get(i)) {
-				
-				Token token = tokensLayer.addToken(tokenString);
-				sentenceTokens.add(token);
-				
-				if (tokenString.equalsIgnoreCase(query)){
-					itemToken.add(token);
-				}
-			}
-			sentencesLayer.addSentence(sentenceTokens);
-			matchesLayer.addItem(matchedCorpus, itemToken);
-			itemToken.clear();
-		}
-		
-		WLData wlData = new WLData(textCorpus);
-		try {
-			WLDObjector.write(wlData, out);
-		} catch (WLFormatException e) {			
-			e.printStackTrace();
-		}
-	}
-	
-	public void writeTCL(OutputStream out, String text, String query){
-		TextCorpusStored textCorpus = new TextCorpusStored(CORPUS_LANG);
-		textCorpus.createTextLayer().addText(text);
-
 		TokensLayer tokensLayer = textCorpus.createTokensLayer();
 		SentencesLayer sentencesLayer = textCorpus.createSentencesLayer();	
 		MatchesLayer matchesLayer = textCorpus.createMatchesLayer(QUERY_LANG, query);
@@ -201,38 +200,49 @@
 		Corpus c;
 		MatchedCorpus matchedCorpus; 
 		for (String pid : corpusList.keySet()){
-			c = corpusList.get(pid);
-			if (c.getTokenizedSentences().size() == 0) continue;
+			c = corpusList.get(pid);			
+			//logger.info(pid);
+			List<Sentence> sentences = c.getSentences();
+			if (sentences.size() == 0) continue;
 			
-			matchedCorpus = matchesLayer.addCorpus(c.getName(), c.getPid());
-			
-			List<String[]> tokenizedSentences = c.getTokenizedSentences();
+			matchedCorpus = matchesLayer.addCorpus(c.getName(), c.getPid());			
 			List<Token> itemToken = new ArrayList<Token>();			
 			
-			for (int i=0; i<tokenizedSentences.size();i++){
+			for (Sentence sentence : sentences){								
+				List<Token> sentenceTokens = new ArrayList<Token>();
 				
-				List<Token> sentenceTokens = new ArrayList<Token>();				
-				for (String tokenString : tokenizedSentences.get(i)) {
+				String[] tokenStrings = sentence.getTokens();				
+				int[] keyIndexes = sentence.getKeyIndexes();				
+				
+				int j=0; // counter for keyIndexes				
+				for (int k = 0; k < tokenStrings.length; k++) {
 					
+					String tokenString = tokenStrings[k];
 					Token token = tokensLayer.addToken(tokenString);
-					sentenceTokens.add(token);
-					
-					if (tokenString.equalsIgnoreCase(query)){
-						itemToken.add(token);
+					sentenceTokens.add(token);	
+										
+					if (j < keyIndexes.length && keyIndexes[j] == k){
+						itemToken.add(j,token);
+						j++;
 					}
-				}
-				sentencesLayer.addSentence(sentenceTokens);
+				}		
+				
+				sentencesLayer.addSentence(sentenceTokens);		
 				matchesLayer.addItem(matchedCorpus, itemToken);
 				itemToken.clear();
 			}
 		}
 		
-		WLData wlData = new WLData(textCorpus);
-		try {
-			WLDObjector.write(wlData, out);
-		} catch (WLFormatException e) {			
-			e.printStackTrace();
-		}
+		return new StreamingOutput() {			
+			@Override
+			public void write(OutputStream output) throws IOException,
+					WebApplicationException {				
+				WLData wlData = new WLData(textCorpus);
+				WLDObjector.write(wlData, output);
+				output.flush();
+			}
+		};
+		
 	}
 	
 	private String readKwicInput(InputStream is) throws XMLStreamException, UnsupportedEncodingException{
@@ -259,12 +269,10 @@
 						String pid = reader.getAttributeValue(i);						
 						logger.info("Corpus: " + URLDecoder.decode(pid,"UTF-8"));						
 						c = corpusList.get(URLDecoder.decode(pid,"UTF-8"));
-						if (c == null) c = corpusList.get(DUMMY_PID);
-						//logger.info(c.getPid());
+						if (c == null) c = defaultCorpus;
 					}					
 				}
 			}
-				
 							
 			else if (e == XMLEvent.START_ELEMENT &&
 					reader.getLocalName().equals("kwic") ){
@@ -273,35 +281,38 @@
 			
 			else if (e == XMLEvent.START_ELEMENT &&
 					reader.getLocalName().equals("c") ){					
-				reader.next();
-				sb.append(reader.getText());
+				e = reader.next();
+				while (e == XMLEvent.CHARACTERS){
+					//logger.info("context: "+reader.getText());
+					sb.append(reader.getText());
+					e = reader.next();
+				}
 				sb.append(" ");
 			}				
 
 			else if (e == XMLEvent.START_ELEMENT &&
 					reader.getLocalName().equals("kw")){				
-				reader.next();
-				sb.append(reader.getText());
-				sb.append(" ");
-			}
-			
-			else if (e == XMLEvent.START_ELEMENT &&
-					reader.getLocalName().equals("c")){					
-				reader.next();
-				sb.append(reader.getText());
-				sb.append(" ");
+				e = reader.next();
+				if (e == XMLEvent.CHARACTERS){
+					String keyword = reader.getText();
+					sb.append("#");
+					sb.append(keyword);
+					sb.append("# ");	
+				}
 			}
 			
 			else if (e == XMLEvent.END_ELEMENT && 
 					reader.getLocalName().equals("kwic")){
+				
 				kwic = normalizeString(sb.toString());
-				//logger.info("sentence {}", kwic);
-				c.addSentence(kwic);					
-				kwicCollector.append(kwic);
+				Sentence s = createSentence(kwic);
+				c.addSentence(s);
+				//logger.info(kwic);
+				kwicCollector.append(s.getSentenceString());				
 			}				
 		}
 		return kwicCollector.toString();
-	}
+	}	
 	
 	private String readInput(InputStream is, List<String[]> tokenizedSentences) 
 			throws XMLStreamException{
@@ -346,20 +357,55 @@
 		return kwicCollector.toString();
 	}
 	
-	private String normalizeString(String text){
+	private Sentence createSentence(String kwic){
+		String[] tokens = kwic.split("\\s+");				
+		int open = ArrayUtils.indexOf(tokens,"#");
+		tokens = ArrayUtils.remove(tokens, open);
+		int close = ArrayUtils.lastIndexOf(tokens,"#");				
+		tokens= ArrayUtils.remove(tokens, close);
+		
+		int[] keyIndexes = new int[close-open];
+		int j=0;
+		for (int i=open; i<close; i++){
+			//logger.info(i+" "+tokens[i]);
+			keyIndexes[j] = i;
+			j++;
+		}
+		
 		StringBuilder sb = new StringBuilder();
+		for (String t: tokens){
+			sb.append(t);
+			sb.append(" ");
+		}
+		String sentenceString = sb.toString();
+		
+		return new Sentence(sentenceString, tokens, keyIndexes);		
+	}
+	
+	private String normalizeString(String text){
+		boolean isPrevPunctuation = false;
+		
+		StringBuilder sb = new StringBuilder();		
 		for (int j = 0; j < text.length(); j++){
 			char temp = text.charAt(j);					
 			if (!Character.isDigit(temp) && !Character.isLetter(temp)){						
 				if (temp == '\''){ sb.append(temp);	}
-				else { sb.append(" "+temp);	}							
+				else { 
+					sb.append(" ");
+					isPrevPunctuation = true;
+				}							
 			}
-			else{ sb.append(temp); }
+			sb.append(temp);
+			
+			if (isPrevPunctuation) {
+				sb.append(" ");
+				isPrevPunctuation = false;
+			}
 		}
-		return sb.toString();			
+		return sb.toString().replaceAll("\\s+", " ");			
 	}	
 	
-	private HttpGet createSearchRetrieveRequest(String query, String maximumRecords) 
+	private HttpGet createSearchRetrieveRequest(String query, int maximumRecords) 
 			throws ServletException{
 		try {
 			URIBuilder builder = new URIBuilder(endpointUri);	
@@ -367,7 +413,7 @@
 			builder.setParameter("version", "1.2");
 			builder.setParameter("query", query);
 			builder.setParameter("startRecord", "1");
-			builder.setParameter("maximumRecords", maximumRecords);
+			builder.setParameter("maximumRecords", String.valueOf(maximumRecords));
 			URI requestURI = builder.build();
 			return new HttpGet(requestURI);
 		}
diff --git a/src/main/java/de/mannheim/ids/sruws/Sentence.java b/src/main/java/de/mannheim/ids/sruws/Sentence.java
new file mode 100644
index 0000000..705f720
--- /dev/null
+++ b/src/main/java/de/mannheim/ids/sruws/Sentence.java
@@ -0,0 +1,34 @@
+package de.mannheim.ids.sruws;
+
+public class Sentence{
+	
+	String sentenceString;
+	String[] tokens;
+	int[] keyIndexes;		
+	
+	public Sentence(String str, String[] tokens, int[] keyIndexes) {
+		this.sentenceString = str;		
+		this.tokens = tokens;
+		this.keyIndexes = keyIndexes;
+	}
+	
+	public String getSentenceString() {
+		return sentenceString;
+	}
+	public void setSentenceString(String sentenceString) {
+		this.sentenceString = sentenceString;
+	}
+	
+	public String[] getTokens() {
+		return tokens;
+	}
+	public void setTokens(String[] tokens) {
+		this.tokens = tokens;
+	}
+	public int[] getKeyIndexes() {
+		return keyIndexes;
+	}
+	public void setKeyIndexes(int[] keyIndexes) {
+		this.keyIndexes = keyIndexes;
+	}		
+}
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index 022a9df..ffee5c4 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -1,6 +1,6 @@
 
-log4j.rootLogger=DEBUG, STDOUT
-log4j.de.mannheim.ids.sruws.SRU_WS = INFO, STDOUT
+log4j.rootLogger=INFO, STDOUT
+log4j.de.mannheim.ids.sruws.SRU_WS = DEBUG, STDOUT
 
 log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
 log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 27ff16c..d2235e6 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -1,9 +1,18 @@
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="SRU_WEB_SERVICE">
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app id="SRU_WEB_SERVICE">
   <display-name>SRU Web-service</display-name>
   
   <servlet>    
     <servlet-name>SRU_WS</servlet-name>        
-    <servlet-class>de.mannheim.ids.sruws.SRU_WS</servlet-class>
+    <!-- <servlet-class>de.mannheim.ids.sruws.SRU_WS</servlet-class> -->
+    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
+    <init-param>
+      <param-name>com.sun.jersey.config.property.packages</param-name>
+      <param-value>de.mannheim.ids.sruws</param-value>
+    </init-param>
     <init-param>
         <param-name>de.mannheim.ids.sruws.endpoint.korap</param-name>
         <param-value>http://clarin.ids-mannheim.de/korapsru</param-value>
@@ -24,34 +33,45 @@
         <param-name>de.mannheim.ids.sruws.endpoint.stuttgart</param-name>
         <param-value>http://clarin01.ims.uni-stuttgart.de/SRUCQIBridge</param-value>
     </init-param>
-    <!-- same case like goethe, pid is sub-resource -->
-    <init-param> 
-        <param-name>de.mannheim.ids.sruws.endpoint.muenchen</param-name>
-        <param-value>https://clarin.phonetik.uni-muenchen.de/BASSRU/</param-value>
-    </init-param>
-    <!-- weird pid -->
-    <init-param>
-        <param-name>de.mannheim.ids.sruws.endpoint.mpi</param-name>
-        <param-value>http://cqlservlet.mpi.nl/</param-value>
-    </init-param>   
-    <!-- doesnt provide scan -->		
-    <init-param>
-        <param-name>de.mannheim.ids.sruws.endpoint.saarland</param-name>
-        <param-value>http://fedora.clarin-d.uni-saarland.de/sru2</param-value>
-    </init-param>
-    <!-- empty pid -->
+
+    <!-- empty pid -->    
     <init-param>
         <param-name>de.mannheim.ids.sruws.endpoint.berlin</param-name>
         <param-value>http://dspin.dwds.de:8088/DDC-Endpoint/sru</param-value>
-    </init-param>
+    </init-param>    			 
+
+    
+    <!-- broken sentences -->
+    
+    <!-- same case like goethe, pid is sub-resource  -->    
+    <!-- <init-param> 
+        <param-name>de.mannheim.ids.sruws.endpoint.muenchen</param-name>
+        <param-value>https://clarin.phonetik.uni-muenchen.de/BASSRU/</param-value>
+    </init-param> -->
+    
+    <!-- weird pid -->
+    <!-- <init-param>
+        <param-name>de.mannheim.ids.sruws.endpoint.mpi</param-name>
+        <param-value>http://cqlservlet.mpi.nl/</param-value>
+    </init-param> -->  
+    
     <!-- pid doesn't match -->
-    <init-param>
+    <!-- <init-param>
         <param-name>de.mannheim.ids.sruws.endpoint.hamburg</param-name>
         <param-value>http://virt-fedora.multilingua.uni-hamburg.de:8080/HZSKsru/</param-value>
-    </init-param>			 
+    </init-param> -->
+     
+    <!-- doesnt provide scan -->		
+   <!--  <init-param>
+        <param-name>de.mannheim.ids.sruws.endpoint.saarland</param-name>
+        <param-value>http://fedora.clarin-d.uni-saarland.de/sru2/</param-value>
+    </init-param> -->
+    
+    <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
     <servlet-name>SRU_WS</servlet-name>
     <url-pattern>/*</url-pattern>
-  </servlet-mapping>
+  </servlet-mapping>  
+ 
 </web-app>
\ No newline at end of file
diff --git a/src/test/java/de/mannheim/ids/sruws/test/TestClient.java b/src/test/java/de/mannheim/ids/sruws/test/TestClient.java
index ee14d32..45de13d 100644
--- a/src/test/java/de/mannheim/ids/sruws/test/TestClient.java
+++ b/src/test/java/de/mannheim/ids/sruws/test/TestClient.java
@@ -1,11 +1,14 @@
 package de.mannheim.ids.sruws.test;
 import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.http.HttpEntity;
 import org.apache.http.HttpHeaders;
 import org.apache.http.HttpResponse;
 import org.apache.http.NameValuePair;
@@ -19,15 +22,15 @@
 		
 	public static void main(String arg[]) throws IOException{
 		String url =
-				"http://localhost:8080/SRU-WS/";
-				//"http://clarin.ids-mannheim.de/sruws/";
+				//"http://localhost:8080/SRU-WS/";
+				"http://clarin.ids-mannheim.de/sruws/";
 		
 		HttpClient client = HttpClients.createDefault();
 		HttpPost post = new HttpPost(url);		
-		post.setHeader(HttpHeaders.ACCEPT,"text/query-ddc");		
+		post.setHeader(HttpHeaders.ACCEPT,"text/query-cql");		
 		
 		List<NameValuePair> urlParameters = new ArrayList<NameValuePair>();
-		urlParameters.add(new BasicNameValuePair("query", "rot"));
+		urlParameters.add(new BasicNameValuePair("query", "Baden-Württemberg"));
 		urlParameters.add(new BasicNameValuePair("maximumRecords", "5"));
 		urlParameters.add(new BasicNameValuePair("endpoint", "korap")); 
 		post.setEntity(new UrlEncodedFormEntity(urlParameters));
@@ -41,13 +44,16 @@
 			System.out.println("Response Code : " + 
 					response.getStatusLine().getReasonPhrase());
 		}
+				
+		FileWriter fw = new FileWriter(new File("test.xml"));
 		
 		BufferedReader reader = new BufferedReader(new InputStreamReader(
 				response.getEntity().getContent()));
 		String line;
 		while ((line = reader.readLine()) != null){
-			System.out.println(line);
+			//System.out.println(line);
+			fw.append(line+"\n");
 		}
-		
+		fw.close();
 	}	
 }
