added total average and max