refactored KernelInfo to share information between function and kernel