State Machine implements state_machine
First version