document state machine
Merge pull request #2 from PapaMarky/document

document state machine