add option for submitting complete function as param