Update CalculateMean with def-initialize