Version 2 of kernel.c