small cleaning in the calculation of th tendency (i believe it was confusing)