added a stateManager