Added the variance function