making weighting at tree level