add update and display score function