wip: state overhaul