added game logic