work on the state manager