\'state\' refactor