minor: using numTrees instead of trees.size