state-machnine commented from index