new function comp_function