make the game work and reset and restart properly