diff --git a/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java b/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
index 7441edd..fc8322c 100644
--- a/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
+++ b/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
@@ -39,7 +39,7 @@
     // todo: use korap.config to get index location
     public SearchKrill (String path) {
     	
-    	System.out.println("Debug: SearchKrill: path='" + path + "'.");
+//    	System.out.println("Debug: SearchKrill: path='" + path + "'.");
         try {
             if (path.equals(":temp:")) {
                 this.index = new KrillIndex();
diff --git a/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java b/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java
index a13958e..db2ae48 100644
--- a/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java
+++ b/src/main/java/de/ids_mannheim/korap/web/service/full/ResourceService.java
@@ -1092,7 +1092,29 @@
         return Response.ok().build();
     }
 
-
+    // EM: legacy support
+    // should be deprecated after a while
+    @GET
+    @Path("/corpus/{corpusId}/{docId}/{matchId}/matchInfo")
+    public Response getMatchInfo (@Context SecurityContext ctx,
+            @Context Locale locale, @PathParam("corpusId") String corpusId,
+            @PathParam("docId") String docId,
+            @PathParam("matchId") String matchId,
+            @QueryParam("foundry") Set<String> foundries,
+            @QueryParam("layer") Set<String> layers,
+            @QueryParam("spans") Boolean spans) throws KustvaktException {
+    	
+    	String[] ids = docId.split("\\.");
+    	if (ids.length !=2){
+    		throw KustvaktResponseHandler.throwit(
+    				new KustvaktException(StatusCodes.PARAMETER_VALIDATION_ERROR, 
+    				docId + " format is wrong. Expected a fullstop between doc id "
+					+ "and text id"));
+    	}		
+    	return getMatchInfo(ctx, locale, corpusId, ids[0], ids[1], matchId, foundries, layers, spans);
+    	
+    }
+    
     // fixme: only allowed for corpus?!
     @GET
     @Path("/corpus/{corpusId}/{docId}/{textId}/{matchId}/matchInfo")
@@ -1124,6 +1146,13 @@
                     e.string());
             throw KustvaktResponseHandler.throwit(e);
         }
+        
+        try {
+            ResourceFinder.searchPublicFiltered(Corpus.class, corpusId);
+        }
+        catch (KustvaktException e) {
+            throw KustvaktResponseHandler.throwit(e);
+        }
 
         String results;
         // fixme: checks for policy matching
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/full/MatchInfoLegacyServiceTest.java b/src/test/java/de/ids_mannheim/korap/web/service/full/MatchInfoLegacyServiceTest.java
new file mode 100644
index 0000000..ce459d9
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/web/service/full/MatchInfoLegacyServiceTest.java
@@ -0,0 +1,94 @@
+package de.ids_mannheim.korap.web.service.full;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.sun.jersey.api.client.ClientResponse;
+
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.utils.JsonUtils;
+import de.ids_mannheim.korap.web.service.FastJerseyTest;
+
+public class MatchInfoLegacyServiceTest extends FastJerseyTest {
+
+    @BeforeClass
+    public static void configure () throws Exception {
+        FastJerseyTest.setPackages("de.ids_mannheim.korap.web.service.full",
+                "de.ids_mannheim.korap.web.filter",
+                "de.ids_mannheim.korap.web.utils");
+    }
+
+
+    @Test
+    public void testGetMatchInfoPublicCorpus () {
+        ClientResponse response = resource().path(getAPIVersion())
+                .path("corpus").path("GOE").path("AGI.04846")
+                .path("p36875-36876").path("matchInfo")
+                .queryParam("foundry", "*")
+                .get(ClientResponse.class);
+       
+        String entity = response.getEntity(String.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        JsonNode node = JsonUtils.readTree(entity);
+        assertNotNull(node);
+        assertEquals("GOE/AGI/04846", node.at("/textSigle").asText());
+        assertEquals("Zweiter römischer Aufenthalt",
+                node.at("/title").asText());
+        assertEquals("vom Juni 1787 bis April 1788",
+                node.at("/subTitle").asText());
+        assertEquals("Goethe, Johann Wolfgang von",
+                node.at("/author").asText());
+        assertTrue(node.at("/snippet").asText()
+                .startsWith("<span class=\"context-left\"></span>"
+                        + "<span class=\"match\"><span title=\"corenlp/p:ADV\">"
+                        + "<span title=\"opennlp/p:ADV\">"
+                        + "<span title=\"tt/l:fern\">"
+                        ));
+    }
+    
+    @Test
+    public void testGetMatchOnlyUnauthorizeCorpus () {
+        ClientResponse response = resource().path(getAPIVersion())
+                .path("corpus").path("WPD15").path("B07.51608")
+                .path("p46-57").path("matchInfo").get(ClientResponse.class);
+
+        assertEquals(ClientResponse.Status.BAD_REQUEST.getStatusCode(),
+                response.getStatus());
+        String entity = response.getEntity(String.class);
+        System.out.println(entity);
+        JsonNode node = JsonUtils.readTree(entity);
+        assertNotNull(node);
+        assertEquals(101, node.at("/errors/0/0").asInt());
+        assertEquals("[Cannot found public resources with ids: [WPD15]]",
+                node.at("/errors/0/2").asText());
+    }
+
+//    @Test
+//    public void testMatchInfoSave () {
+//
+//    }
+//
+//
+//    @Test
+//    public void testMatchInfoDelete () {
+//
+//    }
+//
+//
+//    @Test
+//    public void testGetMatches () {
+//
+//    }
+
+
+    @Override
+    public void initMethod () throws KustvaktException {
+        helper().runBootInterfaces();
+    }
+}
\ No newline at end of file
