diff --git a/templates/index.html.ep b/templates/index.html.ep
index 9851b45..5ede4fe 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -10,11 +10,12 @@
     <script src = "https://cdn.datatables.net/plug-ins/1.10.16/sorting/scientific.js"></script>
     <link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
     <script
-      src="http://code.jquery.com/ui/1.12.1/jquery-ui.min.js"
-           integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU="
-           crossorigin="anonymous"></script>
+        src="http://code.jquery.com/ui/1.12.1/jquery-ui.min.js"
+        integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU="
+        crossorigin="anonymous"></script>
     <script>
      var urlParams = new URLSearchParams(window.location.search);
+     var currentWord = urlParams.get("word");
 
      $('#firstable').hide();
      $(document).ready(function() {
@@ -40,10 +41,14 @@
              });
          });
 
-         function changeCharColor(txt, heat) {
+         function changeCharColor(txt, heat, word) {
              var newText = "";
              for (var i=0, l=txt.length; i<l; i++) {
-                 newText += (i == 5 ? txt.charAt(i) : '<span style="background-color:'+getHeatColor(heat[i]/maxHeat)+'">'+txt.charAt(i)+'</span>');
+                 newText += (i == 5 ? txt.charAt(i) : '<a href="http://korap.ids-mannheim.de/kalamar/?ql=cosmas2&q=' +
+                                                      currentWord + ' /' +  (i > 5? '%2B' : '-') + 'w' +
+                                                      Math.abs(i-5) + ':' +  Math.abs(i-5) + ' ' + word +
+                                                      '" target="korap"><span style="background-color:' +
+                                                      getHeatColor(heat[i]/maxHeat)+'">'+txt.charAt(i)+'</span></a>');
              }
              return newText;
          }
@@ -53,12 +58,12 @@
              return ["hsl(",hue,",90%,70%)"].join("");
          }
 
-         function bitvec2window(n, heat) {
+         function bitvec2window(n, heat, word) {
              var str = n.toString(2).padStart(10, "0")
                         .replace(/^([0-9]{5})/, '$1x')
                         .replace(/0/g, '·')
                         .replace(/1/g, '+');
-             return changeCharColor(str, heat);
+             return changeCharColor(str, heat, word);
          }
 
          % use Mojo::ByteStream 'b';
@@ -127,7 +132,7 @@
                  "dom": '<"top">rt<"bottom"flp><"clear">',
                  "columns": [
                      { "data": "rank", type: "allnumeric" },
-                     { "data": "pos", width: "7%", sClass: "dt-center mono compact", render: function ( data, type, row ) {return bitvec2window(data, row.heat) }},
+                     { "data": "pos", width: "7%", sClass: "dt-center mono compact", render: function ( data, type, row ) {return bitvec2window(data, row.heat, row.word) }},
                      { "data": "max",  render: function ( data, type, row ) {return data.toFixed(3) }},
                      { "data": "conorm", render: function ( data, type, row ) {return data.toFixed(3) }},
                      { "data": "prob", type: "scientific", render: function ( data, type, row ) {return data.toExponential(3) }  },
@@ -503,8 +508,8 @@
                 T.Y[i][0] = (d.x - mapWidth/2 - tx)/ss/20;
                 T.Y[i][1] = (d.y - mapHeight/2 - ty)/ss/20;
                 return "translate(" +
-                                (d.x) + "," +
-                                (d.y) + ")";
+                                 (d.x) + "," +
+                                 (d.y) + ")";
             });
      }
 
@@ -514,8 +519,8 @@
             .data(data.words)
             .attr("transform", function(d, i) {
                 return "translate(" +
-                                 ((Y[i][0]*20*ss + tx) + mapWidth/2) + "," +
-                                 ((Y[i][1]*20*ss + ty) + mapHeight/2) + ")"; });
+                                  ((Y[i][0]*20*ss + tx) + mapWidth/2) + "," +
+                                  ((Y[i][1]*20*ss + ty) + mapHeight/2) + ")"; });
      }
 
      var svg;
@@ -840,7 +845,7 @@
                   <td align="right">
                   </td>
                   <script
-                    src="http://code.jquery.com/ui/1.12.1/jquery-ui.min.js"
+                      src="http://code.jquery.com/ui/1.12.1/jquery-ui.min.js"
                       </td>
                 </tr>
               </tbody>
