fixed some of the score algorithm