fix the goal

implemented the goal feature to game over