preparing for state changes