Average calculation and popups to display statistics.