add kernel function implementations