add kernel code