game logic revised