fixed findVariance to not calculate mean everytime for each item, style changes