added stable game logic