worked out logic for all kernels up to dual 32-bit outputs