refactored rebootstate