refactor worker to accommodate aggregator