added purify.py