more refactoring: broken state