v4 of state.js