finished StateManager.