fix issue #10 add agg definition