added some game logic