Updated phdchat_aggregator.py code