working version of aggr view