finished input stuff to handle different kernels