swap states in state machine