state_machine_construction