add kernel function to check