adding weights to likelihood and tree