added average data functions