update state_machine