Update function word_score