added ability to aggregate statistics per visibility