revised to allow building on different kernels