Update scoring algorithm

This two lines improve the algorithm and improve the elegance