diff --git a/doc/concat_diag.png b/doc/concat_diag.png
index 423297525ad94b7ed4512f7fd7ca94f591616ad2..252b34034c426ffa797762ae538f090312dfb208 100644
Binary files a/doc/concat_diag.png and b/doc/concat_diag.png differ
diff --git a/melhlprfns.cc b/melhlprfns.cc
index aeae8bbf12ba7703ab3e2a6629448c4a8acc4612..5954a48bcec1dde0eaf8bc73229ac19159e323df 100644
--- a/melhlprfns.cc
+++ b/melhlprfns.cc
@@ -566,9 +566,12 @@ namespace Melodic{
 
     int res = 0;
     ColumnVector PPCA;
- 
+ 		RowVector PercEV(PPCAest.Column(1).t());
+	  PercEV = cumsum(PercEV / sum(PercEV,2).AsScalar());
+
 		if(which == string("aut"))
-			if(int(estimators(2)) < int(estimators(1)) && int(estimators(2)) > 15){
+			if(int(estimators(2)) < int(estimators(1)) && 
+				float(PercEV(int(estimators(2))))>0.8){
 				res=int(estimators(2));
 	      PPCA << PPCAest.Column(3);
 			}else{