Added averaging to measurements