adding logic for the game process