use legacy.py for chat extract