generating agg id on creation