functioning prompt, need to fix bug with aggregation by time