update scoring function