game logic improved