added machine.valid_events