finished kernel code. need to check now