substitute the tf function for other using the kernels