Merged fsm and preform_next_action