added numba switches and cleaned up kernel1