refactor highscore logic