added aggregation function and plot