fix a bug with hist and add flag  still slower
o
improve pruning