edited game logic