added state diagram @afein
moved state diagram to its own subsection