script to plot aggregates added