Added an average option
Added an average option