added score and fixed endgame