complete the function setting