error in average calculator