working on game logic