added corr variable and corrected variance for uniform