fixing game logic