added func_cmp in preparation for func_exponent