stateWriter