building out the game logic