score update code