refactored kernels, added kernels for double and it;