handles state config
lite wip