Use the correct index variable to access the trees array
diff --git a/forest/index.js b/forest/index.js
index 7b4f9df..7dc610c 100755
--- a/forest/index.js
+++ b/forest/index.js
@@ -98,7 +98,7 @@
         for (var i=0; i < data.length ;i++) {
             var dec = [];
             for (var j=0; j < this.n_estimators; j++){
-                dec.push(trees[i].predict(data[i]));
+                dec.push(trees[j].predict(data[i]));
             }
             if (utils.GetType(dec[0]) == "string"){
                 probabilities[i] = utils.GetDominate(dec);