Complete first draft of state diagram