diff --git a/templates/index.html.ep b/templates/index.html.ep
index 38a41a0..32be0a8 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -168,56 +168,60 @@
              $('#display_error')
                .html('Error: ' + xhr.status + ' ' + xhr.statusText);
            }
-         })
+         });
 
-         $.post('/derekovecs/getClassicCollocators',
-                JSON.stringify(paraResults[0][0].rank),
-                function(collocators, status) {
-                  collocatorTable = $('#classicoloctable').DataTable({
-                    data: collocators,
-                    "sScrollY": "780px",
-                    "bScrollCollapse": true,
-                    "bPaginate": false,
-                    "bJQueryUI": true,
-                    "dom": '<"top">rt<"bottom"flp><"clear">',
-                    "columns": [
-                      //                      { "data": "pos", width: "7%", sClass: "dt-center mono compact", render: function ( data, type, row ) {return bitvec2window(data, row.heat, row.word) }},
-                      { "data": "llr",  render: function ( data, type, row ) {return data.toFixed(3) }},
-                      { "data": "lfmd", render: function ( data, type, row ) {return data.toFixed(3) }},
-                      { "data": "fpmi", type: "scientific", render: function ( data, type, row ) {return data.toExponential(3) }  },
-                      { "data": "npmi", type: "scientific", render: function ( data, type, row ) {return data.toExponential(3) }  },
-                      { "data": "word",  sClass: "collocator" }
-                    ],
-                    "columnDefs": [
-                      { className: "dt-right", "targets": [0,1,2,3] },
-                      { "searchable": false,
-                        "orderable": false,
-                        "targets": []
-                      },
-                      { "type": "scientific", targets: [2,3] },
-                      { "orderSequence": [ "desc" ], "targets": [ 0, 1, 2, 3 ] },
-                      { "orderSequence": [ "asc", "desc" ], "targets": [ 4 ] },
-                    ],
-                    "oLanguage": {
-                      "sSearch": "Filter: "
-                    },
-                    "order": [[ 1, 'desc' ]],
-                  } );
-                }, 'json');
+         classicCollocatorTable = $('#classicoloctable').DataTable({
+           ajax: {
+             method: "POST",
+             url: '/derekovecs/getClassicCollocators',
+             dataType: 'json',
+             dataSrc: "",
+             timeout: 30000,
+             data: function ( d ) {
+               return JSON.stringify(paraResults[0][0].rank);
+             }
+           },
+           "sScrollY": "780px",
+           "bScrollCollapse": true,
+           "bPaginate": false,
+           "bJQueryUI": true,
+           "dom": '<"top">rt<"bottom"flp><"clear">',
+           "columns": [
+             //                      { "data": "pos", width: "7%", sClass: "dt-center mono compact", render: function ( data, type, row ) {return bitvec2window(data, row.heat, row.word) }},
+             { "data": "llr",  render: function ( data, type, row ) {return data.toFixed(3) }},
+             { "data": "lfmd", render: function ( data, type, row ) {return data.toFixed(3) }},
+             { "data": "fpmi", type: "scientific", render: function ( data, type, row ) {return data.toExponential(3) }  },
+             { "data": "npmi", type: "scientific", render: function ( data, type, row ) {return data.toExponential(3) }  },
+             { "data": "word",  sClass: "collocator" }
+           ],
+           "columnDefs": [
+             { className: "dt-right", "targets": [0,1,2,3] },
+             { "searchable": false,
+               "orderable": false,
+               "targets": []
+             },
+             { "type": "scientific", targets: [2,3] },
+             { "orderSequence": [ "desc" ], "targets": [ 0, 1, 2, 3 ] },
+             { "orderSequence": [ "asc", "desc" ], "targets": [ 4 ] },
+           ],
+           "oLanguage": {
+             "sSearch": "Filter: "
+           },
+           "order": [[ 1, 'desc' ]],
+         });
 
          collocatorTable.on( 'order.dt search.dt', function () {
            collocatorTable.column(0, {order:'applied'}).nodes().each( function (cell, i) {
              cell.innerHTML = i+1;
            } );
-         } ).draw();
+         }).draw();
+       }
 
-         if (localStorage && !window.location.hash) { // let's not crash if some user has IE7
-           var index = parseInt(localStorage['tab']||'0');
-           $("#tabs").tabs({ active: index });
-         }
+       if (localStorage && !window.location.hash) { // let's not crash if some user has IE7
+         var index = parseInt(localStorage['tab']||'0');
+         $("#tabs").tabs({ active: index });
        }
        $("#tabs").css("visibility", "visible"); // now we can show the tabs
-
      });
 
      $(function(){
@@ -931,7 +935,7 @@
                   <th>llr</th>
                   <th title="log-frequency biased mutual dependency">lfmd</th>
                   <th title="frequency biased pointwise mutual information">fpmi</th>
-                  <th title="normalized mutual information">npmi</th>
+                  <th title="normalized pointwise mutual information">npmi</th>
                   <th>collocator</th>
                 </tr>
               </thead>
