Try defining the input of the sub/function as control.