refactored gamemanager