unnested switch-case initial state changed