improve cdn.py