added chi.py