diff --git a/testfile.cc b/testfile.cc
index 8b4a30bd604b4e9951377bc7f0a10fe8be7011d2..847fd1a84e0dceed6902da9b2079c3944d40c928 100644
--- a/testfile.cc
+++ b/testfile.cc
@@ -37,8 +37,8 @@ int main(int argc, char** argv){
   //volume<float> mask;
   //  Matrix datam;
   cerr<<"pants"<<endl;
-  read_volume4D(data,"dat");//data,opts.datafile.value());
-  cerr<<"pants1"<<endl;
+  //  read_volume4D(data,"dat");//data,opts.datafile.value());
+  //cerr<<"pants1"<<endl;
   //  read_volume(mask,"mas");//mask,opts.maskfile.value());
   //cerr<<"pants2"<<endl;
   //datam=data.matrix(mask);  
@@ -47,4 +47,10 @@ int main(int argc, char** argv){
   //vector<vector<int> > poo;
   //string af="avg_file";
   //read_avg_file(poo,af);
+  Matrix a(2,1);
+  a(1,1)=10.2;
+  a(2,1)=4.1;
+  element_mod_n(a,M_PI);
+  cerr<<a<<endl;
+
 }
diff --git a/xfibres.cc b/xfibres.cc
index bd8ab5afc14340d48309d3bccf5a0494829a85e2..624e6c07c4bc4c8d0842a77ca2602eb0b39c69be 100644
--- a/xfibres.cc
+++ b/xfibres.cc
@@ -192,19 +192,22 @@ public:
     //Sort the output based on mean_fsamples
     // 
     vector<Matrix> sumf;
+    cerr<<"cock"<<endl;
     for(int f=0;f<opts.nfibres.value();f++){
       Matrix tmp=sum(m_fsamples[f],1);
       sumf.push_back(tmp);
     }  
-    
+    cerr<<"cock2"<<endl;
     for(int vox=1;vox<=m_dsamples.Ncols();vox++){
       vector<pair<float,int> > sfs;
       pair<float,int> ftmp;
+      
       for(int f=0;f<opts.nfibres.value();f++){
 	ftmp.first=sumf[f](1,vox);
 	ftmp.second=f;
 	sfs.push_back(ftmp);
       }
+      cerr<<sfs.size()<<endl;
       sort(sfs.begin(),sfs.end());
       
       for(int samp=1;samp<=m_dsamples.Nrows();samp++){
@@ -219,11 +222,11 @@ public:
       
       
     }
-    
+    cerr<<"cock3"<<endl;
     // save the sorted fibres
     for(int f=0;f<opts.nfibres.value();f++){
-      element_mod_n(thsamples_out[f],M_PI);
-      element_mod_n(phsamples_out[f],2*M_PI);
+      //      element_mod_n(thsamples_out[f],M_PI);
+      //      element_mod_n(phsamples_out[f],2*M_PI);
       tmp.setmatrix(thsamples_out[f],mask);
       string oname="th"+num2str(f+1)+"samples";
       save_volume4D(tmp,logger.appendDir(oname));