Switching to multiple state machines