add functionality to update score on valid word