refactor game manager