updated game logic