added ability to set time period via id for aggregation