implemented the kernel monitor