added random game logic