game logic works