update of the documentation, adding state_machine diagram