finished porting the kernel from lab2