update score calculation