added fsm_handle_events