to parallelize use parallel loop instead of kernels