Added more logic to game_main