Added slave state machine