V1.5 - add 'next_state_on_target' to change a state according to the submachine states