State machine diagram.