introduce stateOf counter