add ability to calculate average