Added thinning.py