write distill.py