     // compute summary statistics
     summary_stats_data<T> result = thrust::transform_reduce(d_x.begin(), d_x.end(), unary_op, init, binary_op);
 
-	std::cout <<"******Summary Statistics Example*****"<<std::endl;
-	print_range("The data", d_x.begin(), d_x.end());
+    std::cout <<"******Summary Statistics Example*****"<<std::endl;
+    print_range("The data", d_x.begin(), d_x.end());
 
     std::cout <<"Count              : "<< result.n << std::endl;
-	std::cout <<"Minimum            : "<< result.min <<std::endl;
-	std::cout <<"Maximum            : "<< result.max <<std::endl;
-
+    std::cout <<"Minimum            : "<< result.min <<std::endl;
+    std::cout <<"Maximum            : "<< result.max <<std::endl;
     std::cout <<"Mean               : "<< result.mean << std::endl;
     std::cout <<"Variance           : "<< result.variance() << std::endl;
     std::cout <<"Standard Deviation : "<< std::sqrt(result.variance_n()) << std::endl;
-	std::cout <<"Skewness           : "<< result.skewness() << std::endl;
-	std::cout <<"Kurtosis           : "<< result.kurtosis() << std::endl;
+    std::cout <<"Skewness           : "<< result.skewness() << std::endl;
+    std::cout <<"Kurtosis           : "<< result.kurtosis() << std::endl;
 
     return 0;
 }

            result.min  = x;
            result.max  = x;
            result.mean = x;
			result.M2   = 0;
			result.M3   = 0;
			result.M4   = 0;

            return result;
        }

struct summary_stats_data
{
    T n;
    T min;
    T max;
    T mean;
    T M2;
    T M3;
    T M4;
    
    // initialize to the identity element
    summary_stats_data()
        : n(0), min(std::numeric_limits<T>::max()), max(std::numeric_limits<T>::min()),
          mean(0), M2(0), M3(0), M4(0)
          {}

    __host__ __device__ T variance()   { return M2 / (n - 1); }
    __host__ __device__ T variance_n() { return M2 / n; }
    __host__ __device__ T skewness()   { return std::sqrt(n) * M3 / std::pow(M2, (T) 1.5); }
    __host__ __device__ T kurtosis()   { return n * M4 / (M2 * M2); }
};

// stats_unary_op is a functor that takes in a value x and
