nearly final result for code, just tweaking kernels from here on out for speed increases