diff --git a/w2v-server.pl b/w2v-server.pl
index 4276b60..2768296 100755
--- a/w2v-server.pl
+++ b/w2v-server.pl
@@ -189,12 +189,13 @@
 	long long wordi;
 	long position;
 	float activation;
+	float average;
 	float cprobability; // column wise probability
+	float cprobability_sum;
 	float probability;
 	float activation_sum;
-	float conorm;
 	float max_activation;
-  float heat[16];
+	float heat[16];
 } collocator;
 
 typedef struct {
@@ -792,7 +793,7 @@
       best[b].position = -1; //  syn_nbs[0]->pos[b];
       best[b].activation_sum = target_sums[syn_nbs[0]->best[b].wordi];
 			best[b].max_activation = 0.0;
-			best[b].conorm = 0.0;
+			best[b].average = 0.0;
 			best[b].probability = 0.0;
 			best[b].cprobability = syn_nbs[0]->best[b].cprobability;
     }
@@ -806,7 +807,7 @@
 						break;
 				if(i >= found_index) {
 					best[found_index].max_activation = 0.0;
-					best[found_index].conorm = 0.0;
+					best[found_index].average = 0.0;
 					best[found_index].probability = 0.0;
 					best[found_index].cprobability = syn_nbs[a]->best[b].cprobability;
 					best[found_index].activation_sum = target_sums[syn_nbs[a]->best[b].wordi]; // syn_nbs[a]->best[b].activation_sum;
@@ -819,11 +820,12 @@
     if(sort_by != 1 && sort_by != 2) { // sort by auto focus mean
 			printf("window: %d  -  syn_threads: %d, %d\n", window, syn_threads, (1 << syn_threads) -1);
 			int wpos;
+      int bits_set = 0;
 			for(i=0; i < found_index; i++) {
-				best[i].activation = best[i].probability = best[i].conorm = 0;
+				best[i].activation = best[i].probability = best[i].average = best[i].cprobability_sum = 0;
 				for(w=1; w <  (1 << syn_threads); w++) { // loop through all possible windows
-					float word_window_sum = 0, word_window_conorm=0, word_activation_sum = 0, total_window_sum = 0;
-					int bits_set = 0;
+					float word_window_sum = 0, word_window_average=0, word_cprobability_sum=0, word_activation_sum = 0, total_window_sum = 0;
+          bits_set = 0;
 					for(a=0; a < syn_threads; a++) {
 						if((1 << a) & w) {
 							wpos = (a >= window? a+1 : a);
@@ -845,7 +847,8 @@
                   word_window_sum += syn_nbs[a]->best[b].activation; // / window_sums[wpos];  // syn_nbs[a]->norm[b];
 //                  word_window_sum += acti - (word_window_sum * acti); syn_nbs[a]->best[b].activation; // / window_sums[wpos];  // syn_nbs[a]->norm[b];
 
-                  word_window_conorm += syn_nbs[a]->best[b].activation - word_window_conorm * syn_nbs[a]->best[b].activation;  // conormalied activation sum
+                  word_window_average += syn_nbs[a]->best[b].activation; // - word_window_average * syn_nbs[a]->best[b].activation;  // conormalied activation sum
+                  word_cprobability_sum += syn_nbs[a]->best[b].cprobability - word_cprobability_sum * syn_nbs[a]->best[b].cprobability;  // conormalied column probability sum
 									word_activation_sum += syn_nbs[a]->best[b].activation;
                   if(syn_nbs[a]->best[b].activation > best[i].max_activation)
 										best[i].max_activation = syn_nbs[a]->best[b].activation;
@@ -854,23 +857,27 @@
 								}
 						}
 					}
-//          if(bits_set) {
+          if(bits_set) {
+            word_window_average /= bits_set;
 //						word_activation_sum /= bits_set;
 //						word_window_sum /= bits_set;
-//          }
+          }
 
 					word_window_sum /= total_window_sum;
 
           if(word_window_sum > best[i].probability) {
+//						best[i].position = w;
 						best[i].probability = word_window_sum;
-						best[i].position = w;
 					}
 
-          if(word_window_conorm > best[i].conorm) {
-						best[i].conorm = word_window_conorm;
-//						best[i].activation = word_activation_sum;
+          if(word_cprobability_sum > best[i].cprobability_sum) {
+						best[i].position = w;
+						best[i].cprobability_sum = word_cprobability_sum;
 					}
-			  }
+
+						best[i].average = word_window_average;
+//						best[i].activation = word_activation_sum;
+        }
 			}
 			qsort(best, found_index, sizeof(collocator), cmp_probability);
 //      for(i=0; i < found_index; i++) {
@@ -950,9 +957,9 @@
       if(latin_enc == 0) SvUTF8_on(word);
       hv_store(hash, "word", strlen("word"), word , 0);
       hv_store(hash, "rank", strlen("rank"), newSVuv(best[a].wordi), 0);
-      hv_store(hash, "conorm", strlen("conorm"), newSVnv(best[a].conorm), 0);
+      hv_store(hash, "average", strlen("average"), newSVnv(best[a].average), 0);
       hv_store(hash, "prob", strlen("prob"), newSVnv(best[a].probability), 0);
-      hv_store(hash, "cprob", strlen("cprob"), newSVnv(best[a].cprobability), 0);
+      hv_store(hash, "cprob", strlen("cprob"), newSVnv(best[a].cprobability_sum), 0);
       hv_store(hash, "max", strlen("max"), newSVnv(best[a].max_activation), 0); // newSVnv(target_sums[best[a].wordi]), 0);
       hv_store(hash, "overall", strlen("overall"), newSVnv(best[a].activation_sum/total_activation), 0); // newSVnv(target_sums[best[a].wordi]), 0);
       hv_store(hash, "pos", strlen("pos"), newSVnv(best[a].position), 0);
