added fading for state transitions