Chapter 3 StateManager